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

Remove/ hide the shop details from admin panel #191

Open
faierbol opened this issue Apr 8, 2022 · 4 comments
Open

Remove/ hide the shop details from admin panel #191

faierbol opened this issue Apr 8, 2022 · 4 comments

Comments

@faierbol
Copy link

faierbol commented Apr 8, 2022

Hi all and congratz for this amazing CMS!!!

Is there a way to temporarily remove or hide the shop option from the admin panel?
Lets say that i would like to build just a simple app page with a blog or a small social network, therefore shop section will not be needed in this scenario and will cause confusing if multiple admins are going to have access to the admin panel.

i think this can be achieve with a condition on the admin panel like enable or disable shop feature. if the feature is disabled then all the options regarding the shop should be hidden/ not displayed on the admin panel and frontend.
Or it can be removed from the core and added as a plugin.

@robodove
Copy link

PR #193 introduces a modules configuration for the cms

though it's just going to hide the features, the API is still providing functionality

@eilrix
Copy link
Member

eilrix commented Apr 22, 2022

@faierbol I'm sorry for delay.

For now you can create a new plugin project with the code in the admin part :

import { registerSidebarLinkModifier } from '@cromwell/admin-panel';

registerSidebarLinkModifier('my-plugin-name', (links) => {
    return links.filter(link => {
        if (link.title === 'Store') return false;
        return true;
    })
})

Soon it'll be possible via settings PR #193 or via permissions PR #194

@eilrix
Copy link
Member

eilrix commented Apr 22, 2022

@playrich Actually I was thinking about this case several times in past. I was about to extend setup (welcome) admin panel page with two checkboxes/sliders:

  • Store
  • Blog

So basically a user will be able to pick a kind of website. After such setup I can disable related API.

Well, it also will be possible to disable API on changes in your modules configuration. It'll require server restart

@faierbol
Copy link
Author

Hi all, thx for your answers :)
Looking forward to test the functionality when this features will be released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants