File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1414
1515 object_permission , created = ObjectPermission .objects .get_or_create (
1616 name = permission_name ,
17- description = permission_details ["description" ],
17+ description = permission_details ["description" ],
1818 enabled = permission_details ["enabled" ],
1919 actions = permission_details ["actions" ],
2020 )
2626 object_permission .save ()
2727
2828 print ("🔓 Created object permission" , object_permission .name )
29-
29+
3030 if permission_details .get ("groups" , 0 ):
3131 for groupname in permission_details ["groups" ]:
3232 group = AdminGroup .objects .get (name = groupname )
3333
3434 if group :
3535 object_permission .groups .add (group )
3636 print (
37- " 👥 Assigned group %s object permission of %s" % (groupname , object_permission . name )
37+ " 👥 Assigned group %s object permission of %s" % (groupname , groupname )
3838 )
3939
4040 if permission_details .get ("users" , 0 ):
4444 if user :
4545 object_permission .users .add (user )
4646 print (
47- " 👤 Assigned user %s object permission of %s" % (username , object_permission . name )
47+ " 👤 Assigned user %s object permission of %s" % (username , groupname )
4848 )
4949
5050 object_permission .save ()
You can’t perform that action at this time.
0 commit comments