本文整理汇总了TypeScript中entcore.model.me类的典型用法代码示例。如果您正苦于以下问题:TypeScript model.me类的具体用法?TypeScript model.me怎么用?TypeScript model.me使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了model.me类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: function
scope.canAccessSubject = function(subject){
if(model.me.hasRight(subject, Behaviours.applicationsBehaviours.exercizer.rights.resource.manager) || model.me.hasRight(subject, 'owner')){
return true;
} else{
return false;
}
};
示例2: function
angular.forEach(subjectList, function(id){
var subject = SubjectService.getById(id);
if(model.me.hasRight(subject, 'owner')){
//scope.lowerRight = 'owner';
isOneOwner = true
}
else if(model.me.hasRight(subject, Behaviours.applicationsBehaviours.exercizer.rights.resource.manager)){
//scope.lowerRight = 'manager';
isOneManage = true;
}
else if(model.me.hasRight(subject, Behaviours.applicationsBehaviours.exercizer.rights.resource.contrib)){
//scope.lowerRight = 'contrib';
isOneContrib = true;
}
else{
//scope.lowerRight = 'read';
isOneRead = true;
}
});
示例3: isSelectableSubject
function isSelectableSubject(subject){
var parent_id;
var owner;
if(scope.display.tab == 'subjectShared'){
parent_id = true;
} else{
if(scope.currentFolderId){
parent_id = subject.folder_id == scope.currentFolderId
} else{
parent_id = subject.folder_id == null;
}
}
//
if(model.me.hasRight(subject, 'owner') && scope.display.tab == 'mySubject'){
owner = true
} else if(!model.me.hasRight(subject, 'owner') && scope.display.tab == 'subjectShared') {
owner = true
} else{
owner = false;
}
return parent_id && owner;
}
示例4:
$scope.hasWorkflowZimbraExpert = () => {
return model.me.hasWorkflow('fr.openent.zimbra.controllers.ZimbraController|preauth');
};