Bläddra i källkod

validate permissions before delete

version-14
Rushabh Mehta 12 år sedan
förälder
incheckning
0d35171c77
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. +1
    -1
      webnotes/model/utils.py

+ 1
- 1
webnotes/model/utils.py Visa fil

@@ -164,7 +164,7 @@ def delete_doc(doctype=None, name=None, doclist = None, force=0):
return

# permission
if not webnotes.has_permission(doctype, "cancel"):
if webnotes.session.user!="Administrator" and not webnotes.has_permission(doctype, "cancel"):
webnotes.msgprint("User not allowed to delete.", raise_exception=1)

tablefields = webnotes.model.meta.get_table_fields(doctype)


Laddar…
Avbryt
Spara