feat(dashboard): filter file by shared link, direct link, uploading status (#2782)
This commit is contained in:
2
assets
2
assets
Submodule assets updated: 2827c6bc2e...ad1a02152c
@@ -157,6 +157,14 @@ func (n *shareNavigator) Root(ctx context.Context, path *fs.URI) (*File, error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if n.user.ID != n.owner.ID && !n.user.Edges.Group.Permissions.Enabled(int(types.GroupPermissionShareDownload)) {
|
if n.user.ID != n.owner.ID && !n.user.Edges.Group.Permissions.Enabled(int(types.GroupPermissionShareDownload)) {
|
||||||
|
if inventory.IsAnonymousUser(n.user) {
|
||||||
|
return nil, serializer.NewError(
|
||||||
|
serializer.CodeAnonymouseAccessDenied,
|
||||||
|
fmt.Sprintf("You don't have permission to access share links"),
|
||||||
|
err,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
return nil, serializer.NewError(
|
return nil, serializer.NewError(
|
||||||
serializer.CodeNoPermissionErr,
|
serializer.CodeNoPermissionErr,
|
||||||
fmt.Sprintf("You don't have permission to access share links"),
|
fmt.Sprintf("You don't have permission to access share links"),
|
||||||
|
|||||||
@@ -253,6 +253,8 @@ const (
|
|||||||
CodeNodeUsedByStoragePolicy = 40086
|
CodeNodeUsedByStoragePolicy = 40086
|
||||||
// CodeDomainNotLicensed domain not licensed
|
// CodeDomainNotLicensed domain not licensed
|
||||||
CodeDomainNotLicensed = 40087
|
CodeDomainNotLicensed = 40087
|
||||||
|
// CodeAnonymouseAccessDenied 匿名用户无法访问分享
|
||||||
|
CodeAnonymouseAccessDenied = 40088
|
||||||
// CodeDBError 数据库操作失败
|
// CodeDBError 数据库操作失败
|
||||||
CodeDBError = 50001
|
CodeDBError = 50001
|
||||||
// CodeEncryptError 加密失败
|
// CodeEncryptError 加密失败
|
||||||
|
|||||||
Reference in New Issue
Block a user