1
0

Add update route to toggle team member admin status

This commit is contained in:
kolaente
2020-08-05 17:21:17 +02:00
parent dfb7730b63
commit 11722bf029
7 changed files with 193 additions and 0 deletions

View File

@ -30,6 +30,11 @@ func (tm *TeamMember) CanDelete(a web.Auth) (bool, error) {
return tm.IsAdmin(a)
}
// CanUpdate checks if the user can modify a team member's right
func (tm *TeamMember) CanUpdate(a web.Auth) (bool, error) {
return tm.IsAdmin(a)
}
// IsAdmin checks if the user is team admin
func (tm *TeamMember) IsAdmin(a web.Auth) (bool, error) {
// Don't allow anything if we're dealing with a list share here