mirror of
https://github.com/strapi/strapi.git
synced 2025-09-20 22:10:06 +00:00
25 lines
682 B
JavaScript
25 lines
682 B
JavaScript
import request from 'utils/request';
|
|
// This method is executed before the load of the plugin
|
|
const bootstrap = (plugin) => new Promise((resolve, reject) => {
|
|
request('/users-permissions/init')
|
|
.then(response => {
|
|
plugin.hasAdminUser = response.hasAdmin;
|
|
plugin.nonProtectedUrl = '/plugins/users-permissions/auth';
|
|
|
|
// Add Users to Content Types section.
|
|
plugin.leftMenuSections.push({
|
|
links: [{
|
|
label: 'Users',
|
|
destination: 'user',
|
|
plugin: 'content-manager',
|
|
}],
|
|
name: 'Content Types',
|
|
});
|
|
|
|
return resolve(plugin);
|
|
})
|
|
.catch(err => reject(err));
|
|
});
|
|
|
|
export default bootstrap;
|