Commit graph

12 commits

Author SHA1 Message Date
9b01aa0ff3 add crew and crew_membership models with migrations
- crews table with name, gamertag, granblue_crew_id, description
- crew_memberships with role enum (member/vice_captain/captain)
- partial unique index ensures one active crew per user
- updated User model with crew associations and helper methods
2025-12-03 22:41:19 -08:00
c19259c84a add artifact models with skill validations 2025-12-03 12:58:32 -08:00
be5be0c3fe fix blueprints: use correct association names instead of 'object' 2025-11-29 17:41:29 -08:00
8381c668bc
Implement roles and visibility (#128)
* Add migrations to add user roles and party visibility.

* Update schema.rb

* Add admin check in User model

* Implement rudimentary visibility of teams

* Adds checks to Party model
* Hides parties from collection views depending on visibility
* Disallows viewing private parties if you're not the owner

* Add a party's visibility to blueprint

* Add admin mode

The API Controller checks if the user is logged in and whether they are an admin, and checks for the X-Admin-Mode header

* Implement admin mode overrides

* Add admin_mode to authorize

* Note to self: Implement user editing by admins

* Fix syntax error with equality in SQL

* Fix syntax error with method name

* Fix bug in who can see restricted parties

* Add privacy control to user profiles
2023-08-25 15:53:56 -07:00
e541182e36 Add all blueprints and associate with models 2022-12-21 03:31:55 -08:00
c1716c1e4f Run RuboCop on everything
yolo
2022-12-21 00:22:47 -08:00
a45193d1b8 Association update and favorites method on User 2022-02-27 20:00:18 -08:00
53e6e8bd39 Add destroy dependencies to models 2022-02-23 16:31:01 -08:00
56f166d816 Remove case_sensitive validator from User
This was removed in Rails 6.1
2021-10-27 09:43:15 -07:00
71a0a090ba Add route for viewing a profile 2020-09-25 14:59:50 -07:00
cb499a68ac Add validations and hooks to User model 2020-09-25 10:54:08 -07:00
f616fe23db Restart on Rails 2020-09-14 18:30:54 -07:00