mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Use permissions.admin, not hasPermission(...)
This commit is contained in:
parent
4a139949f2
commit
9e0d5ff890
5 changed files with 4 additions and 9 deletions
|
@ -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
|
||||
|
|
|
@ -17,7 +17,6 @@ define [
|
|||
annotationsLayerCss
|
||||
highlightsLayerCss
|
||||
) ->
|
||||
console.log "SETTING workerSrc", PDFJS, window.pdfJsWorkerPath
|
||||
if PDFJS?
|
||||
PDFJS.workerSrc = window.pdfJsWorkerPath
|
||||
|
||||
|
|
|
@ -17,6 +17,3 @@ define [], () ->
|
|||
@$scope.permissions.read = true
|
||||
@$scope.permissions.write = true
|
||||
@$scope.permissions.admin = true
|
||||
|
||||
@$scope.hasPermission = (requestedLevel)=>
|
||||
return @$scope.permissions[requestedLevel]
|
|
@ -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"
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue