Move auth service to components directory

pull/3796/head
Alex Dik 9 years ago
parent 9d9aa3c837
commit c8d77db1f8
  1. 8
      frontend/app/components/common/services/model-auth.service.js
  2. 6
      frontend/app/components/common/services/model-auth.service.test.js
  3. 1
      frontend/app/services/index.js

@ -26,7 +26,11 @@
// See doc/COPYRIGHT.rdoc for more details.
// ++
module.exports = function() {
angular
.module('openproject.services')
.factory('AuthorisationService', AuthorisationService);
function AuthorisationService() {
var links = {};
var AuthorisationService = {
@ -45,4 +49,4 @@ module.exports = function() {
};
return AuthorisationService;
};
}

@ -30,9 +30,9 @@
describe('AuthorisationService', function() {
var AuthorisationService, query, queryData;
var AuthorisationService, query;
beforeEach(module('openproject.services', 'openproject.models'));
beforeEach(angular.mock.module('openproject.services', 'openproject.models'));
beforeEach(inject(function(_AuthorisationService_){
AuthorisationService = _AuthorisationService_;
@ -52,7 +52,5 @@ describe('AuthorisationService', function() {
it('should not allow action', function() {
expect(AuthorisationService.can('query', 'delete')).to.be.false;
});
});
});

@ -34,7 +34,6 @@ angular.module('openproject.services')
'NotificationsService',
require('./activity-service')
])
.service('AuthorisationService', require('./authorisation-service'))
.service('CacheService', [
'HALAPIResource',
'$http',

Loading…
Cancel
Save