Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: Add permissions for links #1407

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

Merged
merged 8 commits into from
May 13, 2022
Merged

Conversation

BrunoQuaresma
Copy link
Collaborator

This PR depends on #1389 and closes #884

Considerations:

  • You can ignore the commits from feat: Check permissions endpoint #1389. I created a branch from it to not block me. After it is merged, I will rebase this PR.
  • I think the only route we care about be public or not is the/users. Am I missing something?
  • Right now, I'm only hiding the admin menu if the user has not read the user's permission. I'm only checking the ability to read or not all the users since we don't have other permissions to check in the UI. Probably, in the future, we want to check for more.

@BrunoQuaresma BrunoQuaresma self-assigned this May 12, 2022
@BrunoQuaresma BrunoQuaresma requested review from presleyp and a team as code owners May 12, 2022 15:37
Copy link
Member

@Kira-Pilot Kira-Pilot left a comment

Choose a reason for hiding this comment

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

The front end looks good! I'm sure the Go does, too but I'll leave that to someone who can read it.

@BrunoQuaresma BrunoQuaresma force-pushed the bq/add-permissions-for-links branch from 810c121 to 424a645 Compare May 13, 2022 13:52
@codecov
Copy link

codecov bot commented May 13, 2022

Codecov Report

Merging #1407 (ae42dcc) into main (64a8b4a) will decrease coverage by 0.05%.
The diff coverage is 87.87%.

@@            Coverage Diff             @@
##             main    #1407      +/-   ##
==========================================
- Coverage   67.07%   67.01%   -0.06%     
==========================================
  Files         287      283       -4     
  Lines       19307    19131     -176     
  Branches      241      244       +3     
==========================================
- Hits        12950    12821     -129     
+ Misses       5016     4980      -36     
+ Partials     1341     1330      -11     
Flag Coverage Δ
unittest-go-macos-latest 54.17% <100.00%> (+0.10%) ⬆️
unittest-go-postgres- 65.58% <100.00%> (+0.09%) ⬆️
unittest-go-ubuntu-latest 56.44% <100.00%> (-0.19%) ⬇️
unittest-go-windows-2022 ?
unittest-js 75.31% <86.20%> (+0.66%) ⬆️
Impacted Files Coverage Δ
coderd/rbac/object.go 100.00% <ø> (ø)
codersdk/users.go 63.79% <ø> (ø)
site/src/xServices/auth/authXService.ts 78.12% <66.66%> (-4.49%) ⬇️
site/src/components/Navbar/Navbar.tsx 92.30% <80.00%> (+92.30%) ⬆️
coderd/roles.go 68.96% <100.00%> (ø)
codersdk/roles.go 63.63% <100.00%> (ø)
site/src/api/api.ts 69.76% <100.00%> (+1.47%) ⬆️
site/src/components/NavbarView/NavbarView.tsx 100.00% <100.00%> (+6.66%) ⬆️
site/src/testHelpers/handlers.ts 65.21% <100.00%> (+5.21%) ⬆️
site/src/xServices/auth/authSelectors.ts 100.00% <100.00%> (ø)
... and 17 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 64a8b4a...ae42dcc. Read the comment docs.

@BrunoQuaresma BrunoQuaresma enabled auto-merge (squash) May 13, 2022 14:24
@BrunoQuaresma BrunoQuaresma merged commit e6168ba into main May 13, 2022
@BrunoQuaresma BrunoQuaresma deleted the bq/add-permissions-for-links branch May 13, 2022 14:26
@misskniss misskniss added this to the V2 Beta milestone May 15, 2022
kylecarbs pushed a commit that referenced this pull request Jun 10, 2022
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.

Add permissions for links and pages
4 participants