Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 of 2 tasks
derrickmehaffy opened this issue Dec 27, 2019 · 14 comments
Closed
1 of 2 tasks
Labels
issue: feature request Issue suggesting a new feature severity: medium If it breaks the basic use of the product but can be worked around

Comments

@derrickmehaffy
Copy link
Member

  • I have created my request on the Product Board before I submitted this issue
  • I have looked at all the other requests on the Product Board before I submitted this issue

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
Copy link
Member Author

tagging @alexandrebodin and @Aurelsicoko for thoughts.

@soupette
Copy link
Contributor

soupette commented Dec 27, 2019

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

@derrickmehaffy
Copy link
Member Author

Thanks @soupette :)

@lauriejim lauriejim added severity: medium If it breaks the basic use of the product but can be worked around issue: feature request Issue suggesting a new feature labels Dec 27, 2019
@Chris533
Copy link

Nice! Watching

@soupette
Copy link
Contributor

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

@nunsie
Copy link
Contributor

nunsie commented Apr 16, 2020

any updates on this yet?

@ChenDogg
Copy link

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

@gtamas
Copy link

gtamas commented May 27, 2020

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
Copy link
Contributor

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

@gtamas
Copy link

gtamas commented May 27, 2020

@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.

@strapi strapi locked as off-topic and limited conversation to collaborators May 28, 2020
@derrickmehaffy
Copy link
Member Author

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
Copy link
Contributor

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
Copy link
Member Author

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
Copy link
Member Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue: feature request Issue suggesting a new feature severity: medium If it breaks the basic use of the product but can be worked around
Projects
No open projects
Development

No branches or pull requests

7 participants