mirror of
https://github.com/strapi/strapi.git
synced 2025-07-24 17:40:18 +00:00
21 lines
432 B
JavaScript
21 lines
432 B
JavaScript
'use strict';
|
|
|
|
const { formatActionsBySections } = require('./formatters');
|
|
|
|
module.exports = {
|
|
/**
|
|
* Returns every permissions, in nested format
|
|
* @param {KoaContext} ctx - koa context
|
|
*/
|
|
async getAll(ctx) {
|
|
const allActions = strapi.admin.services.permission.provider.getAll();
|
|
|
|
ctx.body = {
|
|
data: {
|
|
conditions: [],
|
|
sections: formatActionsBySections(allActions),
|
|
},
|
|
};
|
|
},
|
|
};
|