mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 07:49:41 +02:00
feat(teamleader) EE-294 redesign team leader (#6973)
feat(teamleader) EE-294 redesign team leader (#6973)
This commit is contained in:
parent
bca1c6b9cf
commit
0522032515
29 changed files with 223 additions and 135 deletions
|
@ -103,6 +103,16 @@ func AuthorizedTeamManagement(teamID portainer.TeamID, context *RestrictedReques
|
|||
return false
|
||||
}
|
||||
|
||||
// AuthorizedIsTeamLeader ensure that the user is an admin or a team leader
|
||||
func AuthorizedIsTeamLeader(context *RestrictedRequestContext) bool {
|
||||
return context.IsAdmin || context.IsTeamLeader
|
||||
}
|
||||
|
||||
// AuthorizedIsAdmin ensure that the user is an admin
|
||||
func AuthorizedIsAdmin(context *RestrictedRequestContext) bool {
|
||||
return context.IsAdmin
|
||||
}
|
||||
|
||||
// authorizedEndpointAccess ensure that the user can access the specified environment(endpoint).
|
||||
// It will check if the user is part of the authorized users or part of a team that is
|
||||
// listed in the authorized teams of the environment(endpoint) and the associated group.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue