handle user roles by organization
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -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": ""
|
||||
}
|
||||
]
|
||||
@@ -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": ""
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user