acl.html 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <div class="modal-body">
  2. <div class="modal-header">
  3. <h2 class="modal-header-title">
  4. <i class="fa fa-lock"></i>
  5. <span class="p-l-1">Permissions</span>
  6. </h2>
  7. <a class="modal-header-close" ng-click="ctrl.dismiss();">
  8. <i class="fa fa-remove"></i>
  9. </a>
  10. </div>
  11. <div class="modal-content">
  12. <table class="filter-table gf-form-group">
  13. <tr ng-repeat="acl in ctrl.items" ng-class="{'gf-form-disabled': acl.inherited}">
  14. <td style="width: 100%;">
  15. <i class="{{acl.icon}}"></i>
  16. <span ng-bind-html="acl.nameHtml"></span>
  17. </td>
  18. <td>
  19. <em class="muted no-wrap" ng-show="acl.inherited">Inherited from folder</em>
  20. </td>
  21. <td class="query-keyword">Can</td>
  22. <td>
  23. <div class="gf-form-select-wrapper">
  24. <select class="gf-form-input gf-size-auto" ng-model="acl.permission" ng-options="p.value as p.text for p in ctrl.permissionOptions" ng-change="ctrl.permissionChanged(acl)" ng-disabled="acl.inherited"></select>
  25. </div>
  26. </td>
  27. <td>
  28. <a class="btn btn-inverse btn-small" ng-click="ctrl.removeItem($index)" ng-hide="acl.inherited">
  29. <i class="fa fa-remove"></i>
  30. </a>
  31. </td>
  32. </tr>
  33. <tr ng-show="ctrl.aclItems.length === 0">
  34. <td colspan="4">
  35. <em>No permissions. Will only be accessible by admins.</em>
  36. </td>
  37. </tr>
  38. </table>
  39. <div class="gf-form-inline">
  40. <form name="addPermission" class="gf-form-group">
  41. <h6 class="muted">Add Permission For</h6>
  42. <div class="gf-form-inline">
  43. <div class="gf-form">
  44. <div class="gf-form-select-wrapper">
  45. <select class="gf-form-input gf-size-auto" ng-model="ctrl.newType" ng-options="p.value as p.text for p in ctrl.aclTypes" ng-change="ctrl.typeChanged()"></select>
  46. </div>
  47. </div>
  48. <div class="gf-form" ng-show="ctrl.newType === 'User'">
  49. <user-picker user-picked="ctrl.userPicked($user)"></user-picker>
  50. </div>
  51. <div class="gf-form" ng-show="ctrl.newType === 'Group'">
  52. <team-picker team-picked="ctrl.groupPicked($group)"></team-picker>
  53. </div>
  54. </div>
  55. </form>
  56. <div class="gf-form width-17">
  57. <span ng-if="ctrl.error" class="text-error p-l-1">
  58. <i class="fa fa-warning"></i>
  59. {{ctrl.error}}
  60. </span>
  61. </div>
  62. </div>
  63. <div class="gf-form-button-row text-center">
  64. <button type="button" class="btn btn-danger" ng-disabled="!ctrl.canUpdate" ng-click="ctrl.update()">
  65. Update Permissions
  66. </button>
  67. <a class="btn-text" ng-click="ctrl.dismiss();">Close</a>
  68. </div>
  69. </div>
  70. </div>
  71. <!-- <br> -->
  72. <!-- <br> -->
  73. <!-- <br> -->
  74. <!-- -->
  75. <!-- <div class="permissionlist"> -->
  76. <!-- <div class="permissionlist__section"> -->
  77. <!-- <div class="permissionlist__section&#45;header"> -->
  78. <!-- <h6>Permissions</h6> -->
  79. <!-- </div> -->
  80. <!-- <table class="filter&#45;table form&#45;inline"> -->
  81. <!-- <thead> -->
  82. <!-- <tr> -->
  83. <!-- <th style="width: 50px;"></th> -->
  84. <!-- <th>Name</th> -->
  85. <!-- <th style="width: 220px;">Permission</th> -->
  86. <!-- <th style="width: 120px"></th> -->
  87. <!-- </tr> -->
  88. <!-- </thead> -->
  89. <!-- <tbody> -->
  90. <!-- <tr ng&#45;repeat="permission in ctrl.userPermissions" class="permissionlist__item"> -->
  91. <!-- <td><i class="fa fa&#45;fw fa&#45;user"></i></td> -->
  92. <!-- <td>{{permission.userLogin}}</td> -->
  93. <!-- <td class="text&#45;right"> -->
  94. <!-- <a ng&#45;click="ctrl.removePermission(permission)" class="btn btn&#45;danger btn&#45;small"> -->
  95. <!-- <i class="fa fa&#45;remove"></i> -->
  96. <!-- </a> -->
  97. <!-- </td> -->
  98. <!-- </tr> -->
  99. <!-- <tr ng&#45;repeat="permission in ctrl.teamPermissions" class="permissionlist__item"> -->
  100. <!-- <td><i class="fa fa&#45;fw fa&#45;users"></i></td> -->
  101. <!-- <td>{{permission.team}}</td> -->
  102. <!-- <td><select class="gf&#45;form&#45;input gf&#45;size&#45;auto" ng&#45;model="permission.permissions" ng&#45;options="p.value as p.text for p in ctrl.permissionTypeOptions" ng&#45;change="ctrl.updatePermission(permission)"></select></td> -->
  103. <!-- <td class="text&#45;right"> -->
  104. <!-- <a ng&#45;click="ctrl.removePermission(permission)" class="btn btn&#45;danger btn&#45;small"> -->
  105. <!-- <i class="fa fa&#45;remove"></i> -->
  106. <!-- </a> -->
  107. <!-- </td> -->
  108. <!-- </tr> -->
  109. <!-- <tr ng&#45;repeat="role in ctrl.roles" class="permissionlist__item"> -->
  110. <!-- <td></td> -->
  111. <!-- <td>{{role.name}}</td> -->
  112. <!-- <td><select class="gf&#45;form&#45;input gf&#45;size&#45;auto" ng&#45;model="role.permissions" ng&#45;options="p.value as p.text for p in ctrl.roleOptions" ng&#45;change="ctrl.updatePermission(role)"></select></td> -->
  113. <!-- <td class="text&#45;right"> -->
  114. <!-- -->
  115. <!-- </td> -->
  116. <!-- </tr> -->
  117. <!-- </tbody> -->
  118. <!-- </table> -->
  119. <!-- </div> -->
  120. <!-- </div> -->
  121. <!-- </div> -->