12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- /**
- * Created by robin on 11/2/15.
- */
-
- angular.module('luticate')
- .controller('UserPermissionsController', ['$scope', 'luticateAuthPermissionsUser', 'data',
- function($scope, luticateAuthPermissionsUser, data) {
-
- $scope.user = data;
-
- $scope.luPermissionEdit = {
- item: $scope.user,
-
- permissions: {
- add: 'LU_PERM_USER_ADD',
- del: 'LU_PERM_USER_DEL',
- edit: 'LU_PERM_USER_EDIT'
- },
-
- getGetAllPromise: function (page, perPage, promise) {
- return luticateAuthPermissionsUser.getAll({
- user_id: this.item.Id,
- page: page,
- perPage: perPage
- }, promise);
- },
-
- getAddPermissionPromise: function (permission_name, permission_value, promise) {
- return luticateAuthPermissionsUser.add({
- user_id: this.item.Id,
- permission_name: permission_name,
- permission_value: permission_value
- }, promise);
- },
-
- getEditPermissionPromise: function (permission_name, permission_value, promise) {
- return luticateAuthPermissionsUser.edit({
- user_id: this.item.Id,
- permission_name: permission_name,
- permission_value: permission_value
- }, promise);
- },
-
- getDelPermissionPromise: function (permission_name, promise) {
- return luticateAuthPermissionsUser.del({
- user_id: this.item.Id,
- permission_name: permission_name
- }, promise);
- }
- };
-
- }]);
|