1
0
Fork 0
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:
Harvey Kandola 2023-06-12 13:24:47 -04:00
parent 15f8a64c86
commit 0adf6d5dc8

View file

@ -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)