Skip to content

Commit

Permalink
fix user roles and groups descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishek9686 committed Oct 30, 2024
1 parent f81a052 commit 5375a8e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions pro/logic/user_mgmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var PlatformUserUserPermissionTemplate = models.UserRolePermissionTemplate{
var NetworkAdminAllPermissionTemplate = models.UserRolePermissionTemplate{
ID: models.UserRoleID(fmt.Sprintf("global-%s", models.NetworkAdmin)),
Name: "Network Admins",
MetaData: "Users with this role can manage all your networks configuration including adding and removing devices.",
MetaData: "Can manage all your networks configuration including adding and removing devices.",
Default: true,
FullAccess: true,
NetworkID: models.AllNetworks,
Expand All @@ -40,7 +40,7 @@ var NetworkAdminAllPermissionTemplate = models.UserRolePermissionTemplate{
var NetworkUserAllPermissionTemplate = models.UserRolePermissionTemplate{
ID: models.UserRoleID(fmt.Sprintf("global-%s", models.NetworkUser)),
Name: "Network Users",
MetaData: "Users with this role Cannot access the admin console, but can connect to nodes in your networks via RAC.",
MetaData: "Cannot access the admin console, but can connect to nodes in your networks via Remote Access Client.",
Default: true,
FullAccess: false,
NetworkID: models.AllNetworks,
Expand Down Expand Up @@ -85,7 +85,7 @@ func UserGroupsInit() {
ID: models.UserGroupID(fmt.Sprintf("global-%s-grp", models.NetworkAdmin)),
Default: true,
Name: "Network Admin Group",
MetaData: "Users in this group can manage all your networks configuration.",
MetaData: "Can manage all your networks configuration.",
NetworkRoles: map[models.NetworkID]map[models.UserRoleID]struct{}{
models.AllNetworks: {
models.UserRoleID(fmt.Sprintf("global-%s", models.NetworkAdmin)): {},
Expand All @@ -101,7 +101,7 @@ func UserGroupsInit() {
models.UserRoleID(fmt.Sprintf("global-%s", models.NetworkUser)): {},
},
},
MetaData: "Users in this group cannot access the admin console, but can connect to nodes in your networks via RAC.",
MetaData: "Cannot access the admin console, but can connect to nodes in your networks via Remote Access Client.",
}
d, _ := json.Marshal(NetworkGlobalAdminGroup)
database.Insert(NetworkGlobalAdminGroup.ID.String(), string(d), database.USER_GROUPS_TABLE_NAME)
Expand All @@ -116,7 +116,7 @@ func CreateDefaultNetworkRolesAndGroups(netID models.NetworkID) {
var NetworkAdminPermissionTemplate = models.UserRolePermissionTemplate{
ID: models.UserRoleID(fmt.Sprintf("%s-%s", netID, models.NetworkAdmin)),
Name: fmt.Sprintf("%s Admin", netID),
MetaData: fmt.Sprintf("Users with this role can manage your network `%s` configuration.", netID),
MetaData: fmt.Sprintf("Can manage your network `%s` configuration.", netID),
Default: true,
NetworkID: netID,
FullAccess: true,
Expand All @@ -126,7 +126,7 @@ func CreateDefaultNetworkRolesAndGroups(netID models.NetworkID) {
var NetworkUserPermissionTemplate = models.UserRolePermissionTemplate{
ID: models.UserRoleID(fmt.Sprintf("%s-%s", netID, models.NetworkUser)),
Name: fmt.Sprintf("%s User", netID),
MetaData: fmt.Sprintf("Users Cannot access the admin console, but can connect to nodes in your network `%s` via RAC.", netID),
MetaData: fmt.Sprintf("Cannot access the admin console, but can connect to nodes in your network `%s` via Remote Access Client.", netID),
Default: true,
FullAccess: false,
NetworkID: netID,
Expand Down Expand Up @@ -163,7 +163,7 @@ func CreateDefaultNetworkRolesAndGroups(netID models.NetworkID) {
models.UserRoleID(fmt.Sprintf("%s-%s", netID, models.NetworkAdmin)): {},
},
},
MetaData: fmt.Sprintf("User in this group can manage your network `%s` configuration including adding and removing devices.", netID),
MetaData: fmt.Sprintf("Can manage your network `%s` configuration including adding and removing devices.", netID),
}
var NetworkUserGroup = models.UserGroup{
ID: models.UserGroupID(fmt.Sprintf("%s-%s-grp", netID, models.NetworkUser)),
Expand All @@ -173,7 +173,7 @@ func CreateDefaultNetworkRolesAndGroups(netID models.NetworkID) {
models.UserRoleID(fmt.Sprintf("%s-%s", netID, models.NetworkUser)): {},
},
},
MetaData: fmt.Sprintf("Users in this group cannot access the admin console, but can connect to nodes in your network `%s` via RAC.", netID),
MetaData: fmt.Sprintf("Cannot access the admin console, but can connect to nodes in your network `%s` via Remote Access Client.", netID),
}
d, _ = json.Marshal(NetworkAdminGroup)
database.Insert(NetworkAdminGroup.ID.String(), string(d), database.USER_GROUPS_TABLE_NAME)
Expand Down

0 comments on commit 5375a8e

Please sign in to comment.