You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- System > Permissions > All Users to view and create new users and associate to a role. There are two tabs 1 is user info the other is User Role where you define the Role for this user. You can only select 1 role per user.
30
30
31
31
*How can you do that programmatically?*
32
+
- You can leverage \Magento\Authorization\Model\Acl\AclRetriever. That as a few methods that will help
33
+
34
+
```php
35
+
/**
36
+
* Get a list of available resources using user details
37
+
*
38
+
* @param string $userType
39
+
* @param int $userId
40
+
* @return string[]
41
+
* @throws AuthorizationException
42
+
* @throws LocalizedException
43
+
*/
44
+
public function getAllowedResourcesByUser($userType, $userId)
45
+
{
46
+
if ($userType == UserContextInterface::USER_TYPE_GUEST) {
0 commit comments