Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

permissions.controller.js 1.2KB

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