-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Description:
Add OFFICER role to user accessType and committee assignments to enable committee-scoped permissions.
Acceptance Criteria:
Update User schema accessType enum to include OFFICER:
accessType: Sequelize.ENUM('STANDARD', 'OFFICER', 'ADMIN', 'SUPERUSER')
Add committees field to User schema (JSON array or comma-separated string):
committees: {
type: Sequelize.ARRAY(Sequelize.STRING), // or Sequelize.TEXT for comma-separated
defaultValue: [],
validate: {
isValidCommittee(value) {
const validCommittees = ['Hack', 'AI', 'ICPC', 'Studio', 'Cyber', 'W', 'Game', 'Design', 'TeachLA'];
// validate each committee in array
}
}
}
Add isOfficer() method to User model
Add hasCommittee(committee) method to User model
Create migration to add OFFICER to enum and committees field
Update getUserProfile() to return committees and officer status
Seed dev database with sample officers (one for each committee)
Migration Example:
See Najms' PR #74
committees: {
type: Sequelize.ARRAY(Sequelize.STRING),
defaultValue: [],
}
// Example values: ['Hack', 'AI'] or ['Studio']
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels