Просмотр исходного кода

Merge pull request #2118 from neilLasrado/develop

Fix - add role to roles table if mentioned in hooks portal menu items
version-14
Nabin Hait 8 лет назад
committed by GitHub
Родитель
Сommit
affa40db83
1 измененных файлов: 2 добавлений и 0 удалений
  1. +2
    -0
      frappe/website/doctype/portal_settings/portal_settings.py

+ 2
- 0
frappe/website/doctype/portal_settings/portal_settings.py Просмотреть файл

@@ -28,6 +28,8 @@ class PortalSettings(Document):
'''Sync portal menu items'''
dirty = False
for item in frappe.get_hooks('portal_menu_items'):
if item.get('role') and not frappe.db.exists("Role", item.get('role')):
frappe.get_doc({"doctype": "Role", "role_name": item.get('role'), "desk_access": 0}).insert()
if self.add_item(item):
dirty = True



Загрузка…
Отмена
Сохранить