so you would have a document type with the property type attached , and then when viewed in the CMS only the elevated user perms can see the property editor??
If thats the case you would have to write the angular page to look at the permissions of each user and do an ng=show
Well I'm not sure it's possible to do pr. "type" but it's possible to do pr. "id". And if it's sufficient to only check for the master admin account it's possible using the "userService" and check if the logged in user's id is 0 - If it is then it's the master admin account being logged in.
So in your controller you could have something like this
angular.module("umbraco").controller("YourController",['$scope','userService', function($scope, userService){
//Setting the initial value for currentUser to null
$scope.currentUser = null;
//Fetching the value of the current used logged into the backoffice to determine whether or not admin features should be visible
var getCurrentUser = userService.getCurrentUser().then(function(dataObj){
var data = dataObj;
$scope.currentUser = data.id;
});
}]);
And then in your view you could have
<div ng-if="currentUser === 0">
<!-- your code here -->
</div>
Custom property editor available for admin users/ users with elevated permissions only
Hi,
Is it possible to create a property editor that is available to admins/ a user type with elevated permissions only in Umbraco?
Poornima
so you would have a document type with the property type attached , and then when viewed in the CMS only the elevated user perms can see the property editor??
If thats the case you would have to write the angular page to look at the permissions of each user and do an ng=show
Hi Poornima
Well I'm not sure it's possible to do pr. "type" but it's possible to do pr. "id". And if it's sufficient to only check for the master admin account it's possible using the "userService" and check if the logged in user's id is 0 - If it is then it's the master admin account being logged in.
So in your controller you could have something like this
And then in your view you could have
I hope this makes any sense :)
/Jan
Thanks guys, I ll need to create a POC for this. But having said that any idea whether such custom property editors can be handled by Courier as well?
is working on a reply...