Ver a proveniência

[fix] check all custom perms before adding permissions from standard docperm (#3280)

version-14
Saurabh há 8 anos
committed by Rushabh Mehta
ascendente
cometimento
eb9551fca7
1 ficheiros alterados com 2 adições e 1 eliminações
  1. +2
    -1
      frappe/permissions.py

+ 2
- 1
frappe/permissions.py Ver ficheiro

@@ -330,7 +330,8 @@ def get_all_perms(role):
'''Returns valid permissions for a given role'''
perms = frappe.get_all('DocPerm', fields='*', filters=dict(role=role))
custom_perms = frappe.get_all('Custom DocPerm', fields='*', filters=dict(role=role))
doctypes_with_custom_perms = list(set(p.parent for p in custom_perms))
doctypes_with_custom_perms = frappe.db.sql_list("""select distinct parent
from `tabCustom DocPerm`""")

for p in perms:
if p.parent not in doctypes_with_custom_perms:


Carregando…
Cancelar
Guardar