12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- /**
- * Created by robin on 11/2/15.
- */
-
- angular.module('luticate')
- .controller('GroupPermissionsController', ['$scope', 'luticateAuthPermissionsGroup', 'data',
- function($scope, luticateAuthPermissionsGroup, data) {
-
- $scope.group = data;
-
- $scope.luPermissionEdit = {
- item: $scope.group,
-
- permissions: {
- add: 'LU_PERM_GROUP_ADD',
- del: 'LU_PERM_GROUP_DEL',
- edit: 'LU_PERM_GROUP_EDIT'
- },
-
- getGetAllPromise: function (page, perPage, promise) {
- return luticateAuthPermissionsGroup.getAll({
- group_id: this.item.Id,
- page: page,
- perPage: perPage
- }, promise);
- },
-
- getAddPermissionPromise: function (permission_name, permission_value, promise) {
- return luticateAuthPermissionsGroup.add({
- group_id: this.item.Id,
- permission_name: permission_name,
- permission_value: permission_value
- }, promise);
- },
-
- getEditPermissionPromise: function (permission_name, permission_value, promise) {
- return luticateAuthPermissionsGroup.edit({
- group_id: this.item.Id,
- permission_name: permission_name,
- permission_value: permission_value
- }, promise);
- },
-
- getDelPermissionPromise: function (permission_name, promise) {
- return luticateAuthPermissionsGroup.del({
- group_id: this.item.Id,
- permission_name: permission_name
- }, promise);
- }
- };
-
- }]);
|