1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- angular.module('luticate')
- .controller('PermissionsController', ['$scope', 'luticateAuthPermissions',
- function($scope, luticateAuthPermissions) {
-
- $scope.luTable = {
- columns: [
- {
- name: "Name",
- width: 6,
- getValue: function (item) {
- return item.Name;
- }
- }, {
- name: "Value",
- width: 5,
- getValue: function (item) {
- return item.Value ? "Allowed" : "Disallowed";
- }
- }
- ],
-
- permissions: {
- add: 'LU_PERM_ADD',
- del: 'LU_PERM_DEL',
- edit: 'LU_PERM_EDIT'
- },
-
- getLoadPagePromise: function (page, perPage, promise) {
- return luticateAuthPermissions.getAll({page: page, perPage: perPage}, promise);
- },
-
- getDelPromise: function (id, promise) {
- return luticateAuthPermissions.del({permission_name: id}, promise);
- },
-
- getEditController: function () {
- return "PermissionEdit";
- },
-
- getItemId: function (item) {
- return item.Name;
- }
- }
- }]);
|