Skip to content

Commit

Permalink
update user roles and group description with network names
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishek9686 committed Dec 15, 2024
1 parent 725da06 commit 125f8a6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pro/logic/user_mgmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,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", network.Name),
MetaData: fmt.Sprintf("can manage your network `%s` configuration.", netID),
MetaData: fmt.Sprintf("can manage your network `%s` configuration.", network.Name),
Default: true,
NetworkID: netID,
FullAccess: true,
Expand All @@ -160,7 +160,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", network.Name),
MetaData: fmt.Sprintf("cannot access the admin console, but can connect to nodes in your network `%s` via Remote Access Client.", netID),
MetaData: fmt.Sprintf("cannot access the admin console, but can connect to nodes in your network `%s` via Remote Access Client.", network.Name),
Default: true,
FullAccess: false,
NetworkID: netID,
Expand Down Expand Up @@ -227,7 +227,7 @@ func CreateDefaultNetworkRolesAndGroups(netID models.NetworkID) {
models.UserRoleID(fmt.Sprintf("%s-%s", netID, models.NetworkAdmin)): {},
},
},
MetaData: fmt.Sprintf("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.", network.Name),
}
var NetworkUserGroup = models.UserGroup{
ID: models.UserGroupID(fmt.Sprintf("%s-%s-grp", netID, models.NetworkUser)),
Expand All @@ -237,7 +237,7 @@ func CreateDefaultNetworkRolesAndGroups(netID models.NetworkID) {
models.UserRoleID(fmt.Sprintf("%s-%s", netID, models.NetworkUser)): {},
},
},
MetaData: fmt.Sprintf("cannot access the admin console, but can connect to nodes in your network `%s` via Remote Access Client.", netID),
MetaData: fmt.Sprintf("cannot access the admin console, but can connect to nodes in your network `%s` via Remote Access Client.", network.Name),
}
d, _ = json.Marshal(NetworkAdminGroup)
database.Insert(NetworkAdminGroup.ID.String(), string(d), database.USER_GROUPS_TABLE_NAME)
Expand Down

0 comments on commit 125f8a6

Please sign in to comment.