handle user roles by organization

This commit is contained in:
Almira Krdzic
2018-10-11 04:16:43 +02:00
parent 9a8e05e341
commit 84cd11f9c9
29 changed files with 1341 additions and 124 deletions

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,90 @@
[
{
"key": "group_5bbe558ba265c",
"title": "Organization Info",
"fields": [
{
"key": "field_5bbe5c0d1f1a7",
"label": "Phone",
"name": "_wiaas_organization_phone",
"type": "text",
"instructions": "",
"required": 1,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "",
"prepend": "",
"append": "",
"maxlength": ""
},
{
"key": "field_5bbe5c291f1a8",
"label": "VAT Code",
"name": "_wiaas_organization_vat",
"type": "text",
"instructions": "",
"required": 1,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "",
"prepend": "",
"append": "",
"maxlength": ""
},
{
"key": "field_5bbe559d66d17",
"label": "Roles",
"name": "_wiaas_organization_roles",
"type": "select",
"instructions": "",
"required": 1,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"choices": {
"administrator": "Administrator",
"supplier": "Supplier",
"commercial_lead": "Commercial Lead",
"customer": "Customer"
},
"default_value": [],
"allow_null": 0,
"multiple": 1,
"ui": 1,
"ajax": 1,
"return_format": "label",
"placeholder": ""
}
],
"location": [
[
{
"param": "taxonomy",
"operator": "==",
"value": "wiaas-user-organization"
}
]
],
"menu_order": 0,
"position": "normal",
"style": "seamless",
"label_placement": "top",
"instruction_placement": "field",
"hide_on_screen": "",
"active": 1,
"description": ""
}
]

View File

@@ -0,0 +1,52 @@
[
{
"key": "group_5bbce9f38f149",
"title": "User Organization",
"fields": [
{
"key": "field_5bbe54366aac1",
"label": "Organization",
"name": "_wiaas_organization_id",
"type": "taxonomy",
"instructions": "Select Organization for user",
"required": 1,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"taxonomy": "wiaas-user-organization",
"field_type": "select",
"allow_null": 0,
"add_term": 0,
"save_terms": 1,
"load_terms": 1,
"return_format": "id",
"multiple": 0
}
],
"location": [
[
{
"param": "user_form",
"operator": "==",
"value": "edit"
},
{
"param": "current_user_role",
"operator": "==",
"value": "administrator"
}
]
],
"menu_order": 0,
"position": "normal",
"style": "seamless",
"label_placement": "left",
"instruction_placement": "field",
"hide_on_screen": "",
"active": 1,
"description": ""
}
]