1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- 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";
- }
- }
- ],
-
- canAdd: 'LU_PERM_ADD',
-
- canDel: 'LU_PERM_DEL',
-
- canEdit: function()
- {
- return true;
- },
-
- getLoadPagePromise: function (page, perPage, query, promise) {
- return luticateAuthPermissions.getAll({page: page, perPage: perPage, query: query}, promise);
- },
-
- getDelPromise: function (id, promise) {
- return luticateAuthPermissions.del({permission_name: id}, promise);
- },
-
- getEditController: function () {
- return "PermissionEdit";
- },
-
- getItemId: function (item) {
- return item.Name;
- }
- }
- }]);
|