選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

grouppermissions.controller.js 1.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /**
  2. * Created by robin on 11/2/15.
  3. */
  4. angular.module('luticate')
  5. .controller('GroupPermissionsController', ['$scope', 'luticateAuthPermissionsGroup', 'data',
  6. function($scope, luticateAuthPermissionsGroup, data) {
  7. $scope.group = data;
  8. $scope.luPermissionEdit = {
  9. item: $scope.group,
  10. permissions: {
  11. add: 'LU_PERM_GROUP_ADD',
  12. del: 'LU_PERM_GROUP_DEL',
  13. edit: 'LU_PERM_GROUP_EDIT'
  14. },
  15. getGetAllPromise: function (page, perPage, promise) {
  16. return luticateAuthPermissionsGroup.getAll({
  17. group_id: this.item.Id,
  18. page: page,
  19. perPage: perPage
  20. }, promise);
  21. },
  22. getAddPermissionPromise: function (permission_name, permission_value, promise) {
  23. return luticateAuthPermissionsGroup.add({
  24. group_id: this.item.Id,
  25. permission_name: permission_name,
  26. permission_value: permission_value
  27. }, promise);
  28. },
  29. getEditPermissionPromise: function (permission_name, permission_value, promise) {
  30. return luticateAuthPermissionsGroup.edit({
  31. group_id: this.item.Id,
  32. permission_name: permission_name,
  33. permission_value: permission_value
  34. }, promise);
  35. },
  36. getDelPermissionPromise: function (permission_name, promise) {
  37. return luticateAuthPermissionsGroup.del({
  38. group_id: this.item.Id,
  39. permission_name: permission_name
  40. }, promise);
  41. }
  42. };
  43. }]);