Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OKU-GIS
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Muhamad
OKU-GIS
Commits
3ee9305b
Commit
3ee9305b
authored
Dec 15, 2021
by
Muhamad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input update permission
parent
b7af101d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
myauth/views.py
myauth/views.py
+7
-0
No files found.
myauth/views.py
View file @
3ee9305b
...
@@ -524,6 +524,13 @@ def addGroup(request):
...
@@ -524,6 +524,13 @@ def addGroup(request):
# print("ini parent ya gan")
# print("ini parent ya gan")
# print(len(result))
# print(len(result))
# print(isParent)
# 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
==
''
:
if
parent
==
''
:
with
conn
.
cursor
()
as
cursor
:
with
conn
.
cursor
()
as
cursor
:
cursor
.
execute
(
"UPDATE auth_group SET name = '"
+
name
+
"', have_parent = NULL WHERE id="
+
str
(
idgroup
))
cursor
.
execute
(
"UPDATE auth_group SET name = '"
+
name
+
"', have_parent = NULL WHERE id="
+
str
(
idgroup
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment