mirror of
https://github.com/netbirdio/netbird.git
synced 2025-06-20 17:58:02 +02:00
add check for regular user
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
This commit is contained in:
parent
78044c226d
commit
1a5f3c653c
@ -103,6 +103,11 @@ func (u *User) IsAdminOrServiceUser() bool {
|
|||||||
return u.HasAdminPower() || u.IsServiceUser
|
return u.HasAdminPower() || u.IsServiceUser
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// IsRegularUser checks if the user is a regular user.
|
||||||
|
func (u *User) IsRegularUser() bool {
|
||||||
|
return !u.HasAdminPower() && !u.IsServiceUser
|
||||||
|
}
|
||||||
|
|
||||||
// ToUserInfo converts a User object to a UserInfo object.
|
// ToUserInfo converts a User object to a UserInfo object.
|
||||||
func (u *User) ToUserInfo(userData *idp.UserData, settings *Settings) (*UserInfo, error) {
|
func (u *User) ToUserInfo(userData *idp.UserData, settings *Settings) (*UserInfo, error) {
|
||||||
autoGroups := u.AutoGroups
|
autoGroups := u.AutoGroups
|
||||||
|
Loading…
x
Reference in New Issue
Block a user