mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-11 01:32:16 +01:00
Restrict roles available to invitation and member.update, fixes ST-264
This commit is contained in:
committed by
Gregor Vostrak
parent
2184b3c835
commit
313cee2db0
@@ -30,9 +30,14 @@ class InvitationStoreRequest extends FormRequest
|
||||
'role' => [
|
||||
'required',
|
||||
'string',
|
||||
// TODO: placeholder role should not be allowed
|
||||
Rule::enum(Role::class),
|
||||
Rule::enum(Role::class)
|
||||
->except([Role::Owner, Role::Placeholder]),
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getRole(): Role
|
||||
{
|
||||
return Role::from($this->input('role'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user