role.tsx 562 B

1234567891011121314151617181920212223242526
  1. import type {BaseRole, OrgRole, TeamRole} from 'sentry/types/organization';
  2. export function RoleFixture(params: Partial<BaseRole> = {}): BaseRole {
  3. return {
  4. id: 'member',
  5. name: 'Member',
  6. desc: '',
  7. ...params,
  8. };
  9. }
  10. export function TeamRoleFixture(params: Partial<TeamRole> = {}): TeamRole {
  11. return {
  12. ...RoleFixture(),
  13. isMinimumRoleFor: 'admin',
  14. ...params,
  15. };
  16. }
  17. export function OrgRoleFixture(params: Partial<OrgRole> = {}): OrgRole {
  18. return {
  19. ...RoleFixture(),
  20. minimumTeamRole: 'contributor',
  21. ...params,
  22. };
  23. }