[minor] allow administrator to edit Page (for role)
This commit is contained in:
parent
bf24fc9661
commit
49ef4130be
1 changed files with 3 additions and 1 deletions
|
|
@ -29,8 +29,10 @@ class Page(Document):
|
|||
self.name += '-' + str(cnt)
|
||||
|
||||
def validate(self):
|
||||
if not getattr(conf,'developer_mode', 0):
|
||||
if self.is_new() and not getattr(conf,'developer_mode', 0):
|
||||
frappe.throw(_("Not in Developer Mode"))
|
||||
if frappe.session.user!="Administrator":
|
||||
frappe.throw(_("Only Administrator can edit"))
|
||||
|
||||
# export
|
||||
def on_update(self):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue