strapi / strapi

πŸš€ Strapi is the leading open-source headless CMS. It’s 100% JavaScript/TypeScript, fully customizable and developer-first.
https://strapi.io
Other
62.91k stars 7.9k forks source link

Allow extensions of the strapi-admin package for backend changes #4838

Closed derrickmehaffy closed 2 years ago

derrickmehaffy commented 4 years ago

Please describe your feature request:

Allowing for backend modifications of the strapi-admin Should be something to consider specifically related to the adminUI administrators model to customize it. This is a similar concept to the users-permissions extensions for the users model.

Previously I was using a hook to make these changes: https://github.com/canonn-science/CAPIv2-Strapi/blob/production/hooks/admin-model/index.js

const _ = require('lodash');

module.exports = () => {
  return {
    async initialize() {
      await _.merge(strapi.admin.models.administrator, {
        connection: 'users'
      });
    },
  };
};

I did this as a "hacky" solution to to change the database connection used for this model, but as of beta.18 this method appears to be broken. I have also attempted to set this via the bootstrap file but my guess is this happens on initial bootup of Strapi so any changes after wouldn't really matter.

The admin itself in my opinion should be considered a "plugin" in itself as in theory you could run Strapi without the admin at all.

I did not create a product board entry for this as it seems like such a small change I'm not sure if it is something that should be included on there.

derrickmehaffy commented 4 years ago

tagging @alexandrebodin and @Aurelsicoko for thoughts.

soupette commented 4 years ago

We are planning to make this package a plugin as well as moving the content manager in it as it a core plugin

derrickmehaffy commented 4 years ago

Thanks @soupette :)

Chris533 commented 4 years ago

Nice! Watching

soupette commented 4 years ago

We will see with @alexandrebodin when we will make this package a plugin.

nunsie commented 4 years ago

any updates on this yet?

ChenDogg commented 4 years ago

Also hacking this one at present. This is a game changer... allows for use cases to expand by multiples

gtamas commented 4 years ago

Oh wow... I can't believe this. This issue was opened almost half a year ago and there is still no progress.

@soupette @alexandrebodin @derrickmehaffy

We are working on a project now which needs this change. What's the best workaround for this? What we need is replacing Bcrypt with PBKDF2. This requires changes in user-permissions plugin and this package. The former is already done, but the latter is problematic..

soupette commented 4 years ago

@gtamas the best way would be to fork the strapi-admin package and install your fork instead of the default one.

gtamas commented 4 years ago

@soupette OK thx! Then we actually have to fork Strapi itself, since strapi-admin is now a part of that. The NPM links are broken, they point to a separate repo which doesn't seem to exist anymore.

derrickmehaffy commented 4 years ago

I'm locking this thread for now and can/will unlock once the Strapi team have more updates and need feedback before they work on this. There is no current ETA

lauriejim commented 3 years ago

This issue has been mentioned on Strapi Community. There might be relevant details there:

https://forum.strapi.io/t/customize-default-registration-admin-form/592/2

derrickmehaffy commented 3 years ago

This issue has been mentioned on Strapi Community Forum. There might be relevant details there:

https://forum.strapi.io/t/extend-user-admin-model/713/12

derrickmehaffy commented 2 years ago

Closing this as the package is now core, best to use patch-package to make these modifications.