Patch for user permissions (#5389)
* Drop column apply_user_permissions from DocPerm and Custom DocPerm * add patches.txt * add __init__.py
This commit is contained in:
parent
a8b62f3cff
commit
8041d04bf9
3 changed files with 11 additions and 0 deletions
|
|
@ -205,3 +205,4 @@ frappe.patches.v10_0.refactor_social_login_keys
|
|||
frappe.patches.v10_0.enable_chat_by_default_within_system_settings
|
||||
frappe.patches.v10_0.remove_custom_field_for_disabled_domain
|
||||
execute:frappe.delete_doc("Page", "chat")
|
||||
frappe.patches.v11_0.drop_column_apply_user_permissions
|
||||
|
|
|
|||
0
frappe/patches/v11_0/__init__.py
Normal file
0
frappe/patches/v11_0/__init__.py
Normal file
10
frappe/patches/v11_0/drop_column_apply_user_permissions.py
Normal file
10
frappe/patches/v11_0/drop_column_apply_user_permissions.py
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import frappe
|
||||
|
||||
def execute():
|
||||
column = 'apply_user_permissions'
|
||||
to_remove = ['DocPerm', 'Custom DocPerm']
|
||||
|
||||
for doctype in to_remove:
|
||||
if column in frappe.db.get_table_columns(doctype):
|
||||
frappe.db.sql("alter table `tab{0}` drop column {1}".format(doctype, column))
|
||||
|
||||
Loading…
Add table
Reference in a new issue