mirror of
https://github.com/documize/community.git
synced 2025-07-18 20:59:43 +02:00
Update permission.go
This commit is contained in:
parent
15f8a64c86
commit
0adf6d5dc8
1 changed files with 2 additions and 3 deletions
|
@ -69,7 +69,7 @@ func CanViewDocument(ctx domain.RequestContext, s store.Store, documentID string
|
|||
return false
|
||||
}
|
||||
|
||||
// CanChangeDocument returns if the clinet has permission to change a given document.
|
||||
// CanChangeDocument returns if the client has permission to change a given document.
|
||||
func CanChangeDocument(ctx domain.RequestContext, s store.Store, documentID string) bool {
|
||||
document, err := s.Document.Get(ctx, documentID)
|
||||
|
||||
|
@ -98,7 +98,7 @@ func CanChangeDocument(ctx domain.RequestContext, s store.Store, documentID stri
|
|||
return false
|
||||
}
|
||||
|
||||
// CanDeleteDocument returns if the clinet has permission to change a given document.
|
||||
// CanDeleteDocument returns if the client has permission to change a given document.
|
||||
func CanDeleteDocument(ctx domain.RequestContext, s store.Store, documentID string) bool {
|
||||
document, err := s.Document.Get(ctx, documentID)
|
||||
|
||||
|
@ -166,7 +166,6 @@ func CanManageSpace(ctx domain.RequestContext, s store.Store, spaceID string) bo
|
|||
return false
|
||||
}
|
||||
|
||||
|
||||
// CanViewSpace returns if the user has permission to view the given spaceID.
|
||||
func CanViewSpace(ctx domain.RequestContext, s store.Store, spaceID string) bool {
|
||||
roles, err := s.Permission.GetUserSpacePermissions(ctx, spaceID)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue