Commit graph

15 commits

Author SHA1 Message Date
5597cab95c
Party sharing into crews (#207)
* add party_shares table and model with associations

* add party share errors and blueprint

* add party shares controller and routes

* include shared parties in listings and show

* add party share factory and model specs

* add party shares controller specs

* include shares in party response for owners

* add crew shared_parties endpoint
2026-01-05 02:39:32 -08:00
513f8c6a66 use 1-based values for collection_privacy enum 2025-12-14 01:23:42 -08:00
b75a905e2e add crew invitations system
- create crew_invitations table with status enum
- add CrewInvitation model with accept/reject flow
- add CrewInvitationsController for send/accept/reject
- add invitation error classes
- add invitation routes nested under crews
- add pending invitations endpoint for current user
- 38 passing specs for model and controller
2025-12-03 23:06:07 -08:00
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