feat: 上传资源和下载资源更新
This commit is contained in:
@@ -2,13 +2,21 @@ import { sequelize } from '../../../modules/sequelize.ts';
|
||||
import { DataTypes, Model } from 'sequelize';
|
||||
|
||||
type AppPermissionType = 'public' | 'private' | 'protected';
|
||||
/**
|
||||
* 共享设置
|
||||
* 1. 设置公共可以直接访问
|
||||
* 2. 设置受保护需要登录后访问
|
||||
* 3. 设置私有只有自己可以访问。\n
|
||||
* 受保护可以设置密码,设置访问的用户名。切换共享状态后,需要重新设置密码和用户名。
|
||||
*/
|
||||
export interface AppData {
|
||||
files: { name: string; path: string }[];
|
||||
permission?: {
|
||||
// 访问权限
|
||||
type: AppPermissionType; // public, private(Only Self), protected(protected, 通过配置访问)
|
||||
users?: string[];
|
||||
orgs?: string[];
|
||||
// 访问权限, 字段和minio的权限配置一致
|
||||
share: AppPermissionType; // public, private(Only Self), protected(protected, 通过配置访问)
|
||||
usernames?: string; // 受保护的访问用户名,多个用逗号分隔
|
||||
password?: string; // 受保护的访问密码
|
||||
'expiration-time'?: string; // 受保护的访问过期时间
|
||||
};
|
||||
}
|
||||
export type AppType = 'web-single' | 'web-module'; // 可以做到网页代理
|
||||
|
||||
Reference in New Issue
Block a user