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

Feature: Authorization #76

Merged
merged 3 commits into from
Sep 22, 2022
Merged

Feature: Authorization #76

merged 3 commits into from
Sep 22, 2022

Conversation

oscar60310
Copy link
Contributor

@oscar60310 oscar60310 commented Sep 16, 2022

Description

I've implemented the logic of #72 , we only need to inject evaluator and provide the user information:

   const profile = this.evaluator.evaluateProfile(user, profiles);
    if (!profile)
      // Should be 403
      throw new Error(`Forbidden`);

I also pass the profile name to template context, we can use {{ context.profileName }} to get it.

Issue ticket number

closes #72

Additional Context

@oscar60310 oscar60310 force-pushed the feature/authorization branch 2 times, most recently from 565e1b7 to b9ba17b Compare September 16, 2022 15:18
@oscar60310 oscar60310 changed the title [WIP] Feature: Authorization Feature: Authorization Sep 16, 2022
@oscar60310 oscar60310 requested a review from kokokuo September 16, 2022 15:23
@oscar60310 oscar60310 marked this pull request as ready for review September 16, 2022 15:23
@oscar60310 oscar60310 linked an issue Sep 16, 2022 that may be closed by this pull request
@oscar60310 oscar60310 force-pushed the feature/data-source-profiles branch from 6ed0ea2 to d9af51f Compare September 19, 2022 09:10
@oscar60310 oscar60310 force-pushed the feature/authorization branch from b9ba17b to 34441c8 Compare September 19, 2022 09:11
@oscar60310 oscar60310 force-pushed the feature/data-source-profiles branch from d9af51f to b31cb21 Compare September 22, 2022 04:12
@oscar60310 oscar60310 force-pushed the feature/authorization branch from 34441c8 to b41d3fc Compare September 22, 2022 04:13
Base automatically changed from feature/data-source-profiles to develop September 22, 2022 14:25
Copy link
Contributor

@kokokuo kokokuo left a comment

Choose a reason for hiding this comment

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

LGTM 👍 👍 👍

@kokokuo kokokuo merged commit bf6ae32 into develop Sep 22, 2022
@kokokuo kokokuo deleted the feature/authorization branch September 22, 2022 14:29
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.

Authorization
2 participants