Skip to content

Commit

Permalink
Merge pull request #193 from longguikeji/zzr/user_perm
Browse files Browse the repository at this point in the history
fix(flush perm): 修复用户权限穿透问题
  • Loading branch information
RockLi authored Jul 13, 2020
2 parents 612937a + 4dc9e2c commit e6b6740
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/flush_perm.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def flush_user_perm():
SET
up.group_perm_value = true
WHERE
np.value = true
np.value = true and up.perm_id = np.perm_id
''')

cursor.execute(f'''
Expand All @@ -165,7 +165,7 @@ def flush_user_perm():
SET
up.dept_perm_value = true
WHERE
np.value = true
np.value = true and up.perm_id = np.perm_id
''')
else:
for user in User.valid_objects.all():
Expand Down

0 comments on commit e6b6740

Please sign in to comment.