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

[TM-833] Allow creation of new frameworks without breaking existing API access. #146

Merged
merged 3 commits into from
Apr 16, 2024

Conversation

roguenet
Copy link
Collaborator

https://gfw.atlassian.net/browse/TM-833

I've also done a couple of other things:

  • Consolidated the GH account creation stuff into the Roles Migration command, as that one should be used to maintain all permission we expect to be able to use in new code and tests
  • Added a new framework-terrafund-enterprises permission in anticipation of the new framework mentioned in the ticket.
  • Fixed a failing test from TM-782 (this sort of things won't make it into staging in the future, once all new branches have the unit testing fix on them).

@@ -33,7 +33,7 @@ protected function isolateAuthorizedFrameworks(QueryBuilder $query, string $tabl
$query->where(function ($query) use ($tableName, $frameworkNames, $user) {
foreach ($frameworkNames as $framework) {
$frameworkPermission = 'framework-' . $framework;
if ($user->hasPermissionTo($frameworkPermission)) {
Copy link
Collaborator Author

@roguenet roguenet Apr 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can and hasPermissionTo appear to consistently test the same thing, but can simply returns false instead of throwing an error when the Permission hasn't been defined.

@roguenet roguenet merged commit be521e9 into staging Apr 16, 2024
1 check passed
@roguenet roguenet deleted the fix/TM-833-new-framework branch April 16, 2024 15:57
egrojMonroy pushed a commit that referenced this pull request Nov 1, 2024
[TM-833] Allow creation of new frameworks without breaking existing API access.
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

Successfully merging this pull request may close these issues.

2 participants