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
When an admin creates an organization, but they don't have a global authorization, the admin cannot access the new organization. This is very disturbing.
Solution
If the admin who created the organization is unable to access it, redirect to the list of organizations and display a notification explaining that they are missing an authorization.
A better solution might be to give an authorization to a team or an agent in the same time as the organization is created. This solution may be explored in the future, but is out of the scope of this issue.
Specification
In src/Controller/OrganizationsController.php, before redirecting to the list of organizations, check if the current user has access to the organization:
// with $authorizer being a \App\Security\Authorizerif ($authorizer->isGranted(`orga:see`, $organization)) {
// ...
}
If the condition is true, set a "success" notification:
// Translation: "The organization has been created."$this->addFlash('success', $translator->trans('organizations.new.created'));
If the condition is false, set a "success" notification:
// Translation: "The organization has been created but you’re not authorized to access it."$this->addFlash('success', $translator->trans('organizations.new.created_no_access'));
The text was updated successfully, but these errors were encountered:
Problem
When an admin creates an organization, but they don't have a global authorization, the admin cannot access the new organization. This is very disturbing.
Solution
If the admin who created the organization is unable to access it, redirect to the list of organizations and display a notification explaining that they are missing an authorization.
A better solution might be to give an authorization to a team or an agent in the same time as the organization is created. This solution may be explored in the future, but is out of the scope of this issue.
Specification
In
src/Controller/OrganizationsController.php
, before redirecting to the list of organizations, check if the current user has access to the organization:If the condition is true, set a "success" notification:
If the condition is false, set a "success" notification:
The text was updated successfully, but these errors were encountered: