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

add $min_role to base controller #261

Merged
merged 7 commits into from
May 20, 2017
Merged

Conversation

glensc
Copy link
Member

@glensc glensc commented May 10, 2017

originally tried to add $is_popup to PartnersController, but the property is used only in Manage controllers. which just implement simple min_role check.

this PR adds min_role property to controllers, so they can just define property and avoid duplicate code actually checking it.

show use different base template and omit back link
moved from managecontroller
this is because partners.php is not under manage,
but also requires min role check
blah, previous code was:

  if (Auth::getCurrentRole() <= User::ROLE_USER) {
      return false;
  }

meaning min_role >= developer is allowed to access
@glensc glensc added this to the 3.2.0 milestone May 13, 2017
@glensc glensc modified the milestones: 3.2.1, 3.2.0 May 20, 2017
@glensc glensc changed the title WIP: add $min_role to base controller add $min_role to base controller May 20, 2017
@glensc glensc merged commit f1eb71e into eventum:master May 20, 2017
@glensc glensc deleted the controller-min-role branch May 20, 2017 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant