mirror of https://github.com/cloudreve/Cloudreve
feat(dashboard): filter file by shared link, direct link, uploading status (#2782)
parent
13e774f27d
commit
a677e23394
2
assets
2
assets
|
@ -1 +1 @@
|
||||||
Subproject commit 2827c6bc2eddc44597f429d1a35c446c15aa7f30
|
Subproject commit ad1a02152cff89f6ce21f3fcaf345b3878755ccc
|
|
@ -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 加密失败
|
||||||
|
|
Loading…
Reference in New Issue