Sfoglia il codice sorgente

[minor] website permissions

version-14
Anand Doshi 10 anni fa
parent
commit
154bdd82e7
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. +3
    -0
      frappe/__init__.py

+ 3
- 0
frappe/__init__.py Vedi File

@@ -428,6 +428,9 @@ def has_website_permission(doctype, ptype="read", doc=None, user=None, verbose=F

hooks = (get_hooks("has_website_permission") or {}).get(doctype, [])
if hooks:
if isinstance(doc, basestring):
doc = get_doc(doctype, doc)

for method in hooks:
result = call(get_attr(method), doc=doc, ptype=ptype, user=user, verbose=verbose)
# if even a single permission check is Falsy


Caricamento…
Annulla
Salva