Commit 3ee9305b authored by Muhamad's avatar Muhamad

input update permission

parent b7af101d
......@@ -524,6 +524,13 @@ def addGroup(request):
# print("ini parent ya gan")
# print(len(result))
# print(isParent)
group = Group.objects.get(name=name)
group.permissions.clear()
for i in all_perm:
permiss = Permission.objects.get(codename=i)
group.permissions.add(permiss)
if parent == '':
with conn.cursor() as cursor:
cursor.execute("UPDATE auth_group SET name = '"+name+"', have_parent = NULL WHERE id="+str(idgroup))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment