Symfony Sonata Admin - Multiple Dashboards - symfony

is it possible to get multiple Admin Dashboards within one project?
Like:
/admin/ got all stuff my admin can do
/user/ got only user stuff
/mod/ part for my moderator
Actually i only have /admin/ with full administration dashboard.
I don't want to use Roles for this - i really wand to have another url for each section

Related

NextJs - How to reuse dynamic routes?

I looked through the official docs but could not find a clear way to do this.
https://nextjs.org/docs/routing/dynamic-routes
I have a route where user can edit his/her profile:
/user/edit
The folder structure is /edit/[userId]/index.jsx
I am trying to reuse the same code/route to give an admin the ability to edit the profile.
The issue is when admin navigates to /user/edit?userId=${user._id} it still edits the admin's profile. The above is req.query.userId
How to pass userId to this route without using req.query:
/edit/[userId]/index.jsx

Wordpress authentication for a custom page with access to plugin data

First, I am a Wordpress Noob. My company builds custom data dashboards. Our client wants to integrate our dashboard into Wordpress. They use plugins, mainly Gravity forms and WooCommerce, from which the dashboard needs to retrieve data.
The dashboard will be build as a custom page (HTML/JS/CSS) and we plan to served it as a Wordpress static item (like: https://qodeinteractive.com/magazine/add-custom-html-page-to-wordpress/).
Ideally, it would work like this:
the clients' user logs in into Wordpress.
Within the Wordpress environment the user can click a button to open our dashboard.
The dashboard fetches the data from Wordpress / a Wordpress API and displays it.
The complexity starts with the last step, how can we access the data from Wordpress/Gravity forms/WooCommerce. I would prefer it, if the user does not have to login separately into our dashboard, but that the credentials provided in Wordpress can be used.
There are API's available for Wordpress/Ggravity forms/WooCommerce, but I am unsure about the authentication part.
I found something about cookie authentication (https://developer.wordpress.org/rest-api/using-the-rest-api/authentication/#cookie-authentication), but I am not sure if this would work or how this works. The information is related to PHP, while we will be using HTML/JS.
Are there other options available?
I know it is a broad question, but I hope to get some pointers to how to deal with this.

Two Sonata Admin Panel Bundles in one Symfony application

Is it possible to have two Sonata Admin Panel Bundles in one Symfony application? How can I achieve this?
As KondukterCRO mentioned, it is possible to have only one Sonata Admin installation per Symfony project.
However, if you need, you can have:
Two dashboards, for example have one native dashboard and for second dashboard - make a custom action + template
Two sets of entities with different access rights. Alhthough all Sonata Admin pages will have one comon prefix - you still can separate access rights to Sonata Admin pages with simple rules in security.yml >> access_control section, or more complex rules - in every admin class, in method ::isGranted()

Drupal 7 - Handling multiple type of users

I need to create a website for a client using Drupal 7, the only problem is that I don't know how to handle multiples login forms and permissions.
The goal is that A type of user must be allowed to browse and do some stuff on the website but they can't post offers, however B type of users can only post their offers and manage their contents, the system is just as Upwork.
How can I achieve this ? I'm not good at PHP but I know how to use Drupal, so are there modules that can help me to do what I want?
This is exactly how Drupal works by default using role based permissions. You won't need to install a module or have different login forms.
Start by creating different roles. RoleA can view certain content types and maybe post comments. RoleB can do everything RoleA can do plus post offers and manage their own content. You can control create/edit/delete permissions by content type. It can all be done using the point and click admin interface.
On admin page /admin/user (root relative path to admin page) you can see your site users. There's also link "+ Add user" for creating new user. So if you edit/create an user, on user edit page there is a section "Roles" where you can set what roles that user can use. One role may be "Browse some stuff" and other "Edit some stuff".. You can add/edit roles at admin page /admin/people/permissions/roles. So create the roles you need there.
And to precisely set what role can do what there is admin page: /admin/people/permissions. So when you create all the roles you need, go to that page to set permissions and after that you can assign roles to your users.

how to create wordpress user that can only view the plugin I wrote

I have written a plugin, where pre-created users can log in to the system and configure the application. Problem is when I give them higher roles they can view other content on the back-end of the site.Such as creating posts, pages and etc. If I give law level role such as subscriber, user can not view the pluging page. They can't do any configuration.
What I need is only give permission to view my admin panel.
This is the code I create admin panel in wordpress.
function oscimp_admin_actions() {
add_management_page("Pages", "My Pages", "activate_plugins", "Skill-Pages", "skills_list_admin");
}
I would like to create a user from subscriber and allow only to this plugin's admin panel. Can we do it?
You can resolve this with add_cap() method of Wordpress. http://codex.wordpress.org/Function_Reference/add_cap
Also you would like to read those articles about roles and caps: http://www.garyc40.com/2010/04/ultimate-guide-to-roles-and-capabilities/ and http://wp.tutsplus.com/articles/quick-tip-user-permissions-and-your-plugin/, no doubt they will help you

Resources