Merge pull request #1171 from rmehta/share-permission-fix
[fix] share permissions with user permissions
This commit is contained in:
commit
a67f36d3d6
2 changed files with 5 additions and 1 deletions
|
|
@ -26,6 +26,10 @@ class Page(Document):
|
|||
cnt = 1
|
||||
self.name += '-' + str(cnt)
|
||||
|
||||
def validate(self):
|
||||
if not getattr(conf,'developer_mode', 0):
|
||||
frappe.throw(_("Not in Developer Mode"))
|
||||
|
||||
# export
|
||||
def on_update(self):
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -297,7 +297,7 @@ class DatabaseQuery(object):
|
|||
|
||||
# share is an OR condition, if there is a role permission
|
||||
if not only_if_shared and self.shared:
|
||||
self.or_conditions.append(self.get_share_condition())
|
||||
self.match_conditions.append(" or {0}".format(self.get_share_condition()))
|
||||
|
||||
if as_condition:
|
||||
conditions = ""
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue