content: check for readonly properties based on variant permissions
This commit is contained in:
@@ -182,6 +182,11 @@
|
||||
}
|
||||
);
|
||||
|
||||
$scope.propertyEditorReadonly = function(property) {
|
||||
const allowBrowse = $scope.content.allowedActions.includes('F');
|
||||
return allowBrowse && $scope.content.allowedActions.length === 1;
|
||||
};
|
||||
|
||||
$scope.propertyEditorDisabled = function (property) {
|
||||
if (property.unlockInvariantValue) {
|
||||
return false;
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
<umb-property-editor
|
||||
model="property"
|
||||
preview="propertyEditorDisabled(property)"
|
||||
ng-attr-readonly="{{content.language.culture === 'da-DK' || undefined}}">
|
||||
<!-- TODO: Update with correct check for readonly -->
|
||||
ng-attr-readonly="{{propertyEditorReadonly(property) || undefined}}">
|
||||
</umb-property-editor>
|
||||
</div>
|
||||
</umb-property>
|
||||
@@ -50,8 +49,7 @@
|
||||
<umb-property-editor
|
||||
model="property"
|
||||
preview="propertyEditorDisabled(property)"
|
||||
ng-attr-readonly="{{content.language.culture === 'da-DK' || undefined}}">
|
||||
<!--TODO: Update with correct check for readonly -->
|
||||
ng-attr-readonly="{{propertyEditorReadonly(property) || undefined}}">
|
||||
</umb-property-editor>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user