You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

permissions.controller.js 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. angular.module('luticate')
  2. .controller('PermissionsController', ['$scope', 'luticateAuthPermissions',
  3. function($scope, luticateAuthPermissions) {
  4. $scope.luTable = {
  5. columns: [
  6. {
  7. name: "Name",
  8. width: 6,
  9. getValue: function (item) {
  10. return item.Name;
  11. }
  12. }, {
  13. name: "Value",
  14. width: 5,
  15. getValue: function (item) {
  16. return item.Value ? "Allowed" : "Disallowed";
  17. }
  18. }
  19. ],
  20. canAdd: 'LU_PERM_ADD',
  21. canDel: 'LU_PERM_DEL',
  22. canEdit: 'LU_PERM_EDIT',
  23. getLoadPagePromise: function (page, perPage, query, promise) {
  24. return luticateAuthPermissions.getAll({page: page, perPage: perPage, query: query}, promise);
  25. },
  26. getDelPromise: function (id, promise) {
  27. return luticateAuthPermissions.del({permission_name: id}, promise);
  28. },
  29. getEditController: function () {
  30. return "PermissionEdit";
  31. },
  32. getItemId: function (item) {
  33. return item.Name;
  34. }
  35. }
  36. }]);