Assignment Stef Bekaert - #40
Open
Stefdev13 wants to merge 7 commits into
Open
Conversation
- Added member role - Added a check on the relevant navlinks to only be present when the user in not a member - Added new Plug "redirect_member" to redirect members to events page if they go to non-allowed url - Added the new Plug to the router and split the scope into 2 scopes: 1 for all user-roles and 1 for admin and superuser only
- Added role update functionality in backend and frontend
- Changed current_roles to a map - Changed select to several checkboxes - Changed updating logic accordingly - Changed formatting on roles in user/index.html.heex - Changed logic for blocking members from special pages (from if role == :member to if role != :superuser or :admin)
- Added the member role to the seeder - Added blocking of updating your own roles in the update route on the user_controller
- Created a conn_case file - Created 4 tests: - Admin kan rollen van andere users aanpassen - Superuser kan rollen van andere users aanpassen - Admin kan eigen rollen niet aanpassen - Superuser kan eigen rollen niet aanpassen Most of the code for these tests was generated by cursor with me orchestrating, testing and fixing it where it went wrong.
This file was generated at the start of working on the case for me to get an understanding of the codebase
Ran a code review in cursor and fixed an non-breaking issue it flagged.
Member
|
Bedankt @Stefdev13 ! We bekijken dit spoedig. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intro
Ik heb het assignment afgewerkt.
Eerst en vooral bedankt voor de opportuniteit om mezelf te kunnen trakteren op een spoedcursus Elixir en Phoenix, ik vond het plezant om er eens mee te kunnen werken.
Assignment
Ik heb alle opdrachten kunnen doen:
AI in the workforce
Ik heb cursor in ask mode gebruikt om mij te helpen bij het uitwerken van het assignment.
Voor het starten met het assignment uit te werken heb ik cursor een .md file laten genereren om de codebase wat in kaart te brengen/uit te leggen zodat ik er sneller mijn weg in kon vinden. Dit .md file zit ook in deze pull request.
Tijdens het assignment heb ik cursor voornamelijk gebruikt om:
Aan het einde van het assignment heb ik ook nog een code review laten uitvoeren door cursor.
Notities
Je kan ook mijn notities die ik gemaakt heb bij het assignment hier lezen: link.