mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
- Added requiredPermissions to the application/config/udfmasterschema.json and set them as mandatory
- Removed the private method _isAllowed from application/controllers/widgets/UDF.php - Removed required permissions from views application/views/system/fas_udf.php and application/views/system/infocenter/zgvpruefungen.php - Widget views application/views/widgets/checkbox, dropdown, textarea and textfield now they print the attribute disabled - Added constant DISABLED to application/widgets/html/HTMLWidget.php - Removed private property _requiredPermissions from application/widgets/udf/UDFWidget.php - application/widgets/udf/UDFWidget.php does not check permissions anymore and does not store them anymore - Added constants PERMISSION_TYPE_READ and PERMISSION_TYPE_WRITE to application/libraries/UDFLib.php - Removed constant PERMISSION_TYPE from application/libraries/UDFLib.php - Removed public method isAllowed from application/libraries/UDFLib.php - Added private methods _readAllowed, _writeAllowed, _setRequiredPermissions and _setReadOnly to application/libraries/UDFLib.php - UDFLib->displayUDFWidget now checks if permissions are declared in the UDF JSON and if the user is allowed to read and write such UDF - UDFLib->saveUDFs now checks if the user has the permissions to write such UDF - Now the UDFs are even displayed in read only mode
This commit is contained in:
@@ -9,6 +9,13 @@
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": ["checkbox", "textfield", "textarea", "date", "dropdown", "multipledropdown"]
|
||||
},
|
||||
"requiredPermissions": {
|
||||
"type": "array"
|
||||
},
|
||||
"description": {
|
||||
"type": "array",
|
||||
},
|
||||
@@ -18,10 +25,6 @@
|
||||
"title": {
|
||||
"type": "array",
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": ["checkbox", "textfield", "textarea", "date", "dropdown", "multipledropdown"]
|
||||
},
|
||||
"sort": {
|
||||
"type": "integer"
|
||||
},
|
||||
@@ -67,5 +70,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": ["type", "name"]
|
||||
}
|
||||
"required": ["type", "name", "requiredPermissions"]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user