Use permissions.admin, not hasPermission(...)

This commit is contained in:
James Allen 2014-07-16 11:50:03 +01:00
parent 4a139949f2
commit 9e0d5ff890
5 changed files with 4 additions and 9 deletions

View file

@ -102,7 +102,8 @@ aside#left-menu.full-size(
)
option(value="pdfjs") Built-In
option(value="native") Native
span(ng-controller="TemplatesController", ng-show="hasPermission('admin')")
span(ng-controller="TemplatesController", ng-show="permissions.admin")
h4() Publish
ul.list-unstyled.nav()
li

View file

@ -17,7 +17,6 @@ define [
annotationsLayerCss
highlightsLayerCss
) ->
console.log "SETTING workerSrc", PDFJS, window.pdfJsWorkerPath
if PDFJS?
PDFJS.workerSrc = window.pdfJsWorkerPath

View file

@ -17,6 +17,3 @@ define [], () ->
@$scope.permissions.read = true
@$scope.permissions.write = true
@$scope.permissions.admin = true
@$scope.hasPermission = (requestedLevel)=>
return @$scope.permissions[requestedLevel]

View file

@ -3,10 +3,7 @@ define [
"ide/permissions/PermissionsManager"
], (App, PermissionsManager) ->
App.controller "TemplatesController", ($scope, $modal, ide) ->
$scope.showPublishTemplateLinkInSideBar = ide.$scope.hasPermission("admin")
$scope.openPublishTemplateModal = () ->
console.log "open"
$modal.open {
templateUrl: "publishProjectAsTemplateModalTemplate"
controller: "PublishProjectAsTemplateModalController"

View file

@ -27,12 +27,13 @@
border-bottom: 1px solid @gray-lighter;
}
h4:first-child {
> h4:first-child {
margin-top: 0;
}
ul.nav {
a {
cursor: pointer;
&:hover, &:active {
background-color: @link-color;
color: white;