Merge branch 'hotfix/21.56.9' into master
[gitter.git] / server / api / v1 / groups / security.js
blobf58f4e337a5583d3bda3be7a2958d154694bea73
1 'use strict';
3 var SecurityResourceRoute = require('../common/create-security-resource');
4 var sdWithPolicyFactory = require('../../../services/security-descriptor-with-policy-service');
5 var Promise = require('bluebird');
7 module.exports = new SecurityResourceRoute({
8   id: 'groupSecurity',
9   getSecurityDescriptorWithPolicyService: function(req) {
10     return Promise.resolve(sdWithPolicyFactory.createForGroup(req.group, req.userGroupPolicy));
11   },
12   subresourcesRoot: {
13     extraAdmins: require('./security-extra-admins')
14   }
15 });