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

Restrict room type access #127

Merged
merged 31 commits into from
May 21, 2021
Merged

Restrict room type access #127

merged 31 commits into from
May 21, 2021

Conversation

dsst95
Copy link
Contributor

@dsst95 dsst95 commented Mar 26, 2021

Fixes #98

Type (Highlight the corresponding type)

  • Bugfix
  • Feature
  • Documentation
  • Refactoring (e.g. Style updates, Test implementation, etc.)
  • Other (please describe):

Checklist

  • Code updated to current masters head
  • Passes CI checks
  • Is a part of an issue
  • Tests added for the bugfix or newly implemented feature, describe below why if not
  • Changelog is updated
  • Documentation of code and features exists

Changes

  • Added roles restriction for room types
  • Disabled room start if room owner hasn't one of the room type roles
  • Added warning message for users who can start room and room type is invalid
  • Added filtering for valid room types of room owner

@SamuelWei SamuelWei changed the title 98 restrict room type access Restrict room type access Apr 23, 2021
@SamuelWei SamuelWei added the enhancement New feature or request label Apr 23, 2021
@SamuelWei SamuelWei added this to In progress in PILOS Apr 23, 2021
@codecov
Copy link

codecov bot commented May 7, 2021

Codecov Report

Merging #127 (10295af) into master (b7b9200) will increase coverage by 0.05%.
The diff coverage is 93.50%.

❗ Current head 10295af differs from pull request most recent head 685183c. Consider uploading reports for the commit 685183c to get more accurate results
Impacted file tree graph

@@             Coverage Diff              @@
##             master     #127      +/-   ##
============================================
+ Coverage     91.31%   91.36%   +0.05%     
- Complexity      540      557      +17     
============================================
  Files           152      153       +1     
  Lines          3016     3081      +65     
  Branches        183      184       +1     
============================================
+ Hits           2754     2815      +61     
- Misses          200      204       +4     
  Partials         62       62              
Impacted Files Coverage Δ Complexity Δ
app/Role.php 66.66% <0.00%> (-33.34%) 3.00 <1.00> (+1.00) ⬇️
resources/js/views/rooms/View.vue 44.89% <ø> (ø) 0.00 <0.00> (ø)
resources/js/views/settings/roomTypes/View.vue 90.76% <78.57%> (-3.35%) 0.00 <0.00> (ø)
app/Http/Controllers/api/v1/RoomController.php 99.21% <100.00%> (+0.01%) 35.00 <0.00> (+1.00)
app/Http/Controllers/api/v1/RoomTypeController.php 100.00% <100.00%> (ø) 15.00 <0.00> (+5.00)
app/Http/Requests/CreateRoom.php 100.00% <100.00%> (ø) 1.00 <0.00> (ø)
app/Http/Requests/RoomTypeRequest.php 100.00% <100.00%> (ø) 3.00 <0.00> (ø)
app/Http/Requests/UpdateRoomSettings.php 100.00% <100.00%> (ø) 1.00 <0.00> (ø)
app/Http/Resources/Room.php 100.00% <100.00%> (ø) 2.00 <0.00> (ø)
app/Http/Resources/RoomType.php 100.00% <100.00%> (ø) 3.00 <1.00> (+1.00)
... and 7 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 b7b9200...685183c. Read the comment docs.

@dsst95 dsst95 marked this pull request as ready for review May 14, 2021 11:26
@dsst95 dsst95 requested a review from SamuelWei May 14, 2021 11:26
Copy link
Collaborator

@SamuelWei SamuelWei left a comment

Choose a reason for hiding this comment

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

Great work!

I think we also need to add the permission inheritance for roomTypes and roles, so the user editing the roomTypes can load the roles.

resources/lang/de/validation.php Outdated Show resolved Hide resolved
resources/js/lang/en/rooms.js Outdated Show resolved Hide resolved
@dsst95 dsst95 requested a review from SamuelWei May 21, 2021 10:27
@dsst95 dsst95 merged commit adbc59d into master May 21, 2021
@dsst95 dsst95 deleted the 98-restrict-room-type-access branch May 21, 2021 13:33
@dsst95 dsst95 moved this from In progress to Done in PILOS May 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
PILOS
Done
Development

Successfully merging this pull request may close these issues.

Restrict room type access
2 participants