mirror of https://github.com/cloudreve/Cloudreve
feat(directlink): allow admin create direct link for users (#2340)
parent
762811d50f
commit
1b8beb3390
|
@ -65,7 +65,7 @@ func (m *manager) GetDirectLink(ctx context.Context, urls ...*fs.URI) ([]DirectL
|
|||
continue
|
||||
}
|
||||
|
||||
if file.OwnerID() != m.user.ID {
|
||||
if file.OwnerID() != m.user.ID && !m.user.Edges.Group.Permissions.Enabled(int(types.GroupPermissionIsAdmin)) {
|
||||
ae.Add(url.String(), fs.ErrOwnerOnly)
|
||||
continue
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue