Only allow admins to change member's names

This commit is contained in:
Tanner Collin 2020-01-23 03:11:37 +00:00
parent 66c959db59
commit 664859dd26
4 changed files with 17 additions and 17 deletions

View File

@ -103,6 +103,8 @@ class MemberSerializer(serializers.ModelSerializer):
'is_director', 'is_director',
'is_staff', 'is_staff',
'is_instructor', 'is_instructor',
'first_name',
'last_name',
'status', 'status',
'expire_date', 'expire_date',
'current_start_date', 'current_start_date',

View File

@ -287,8 +287,6 @@ Edit Member Details
:json postal_code: :json postal_code:
:json boolean set_details: Set true if they've filled out the new member :json boolean set_details: Set true if they've filled out the new member
form on sign up so the UI stops showing it. form on sign up so the UI stops showing it.
:json first_name:
:json last_name:
:json preferred_name: What's shown throughout the UI. :json preferred_name: What's shown throughout the UI.
:json emergency_contact_name: optional :json emergency_contact_name: optional
:json emergency_contact_phone: optional :json emergency_contact_phone: optional
@ -300,6 +298,8 @@ Edit Member Details
Can modify any member. Above fields, plus: Can modify any member. Above fields, plus:
:json first_name:
:json last_name:
:json boolean is_director: Grants admin privileges to member. :json boolean is_director: Grants admin privileges to member.
:json boolean is_staff: Same as director, just not named one. :json boolean is_staff: Same as director, just not named one.
:json boolean is_instructor: Able to create and edit courses and sessions. :json boolean is_instructor: Able to create and edit courses and sessions.

View File

@ -107,21 +107,6 @@ export function AccountForm(props) {
<Form onSubmit={handleSubmit}> <Form onSubmit={handleSubmit}>
<Header size='medium'>Member Details</Header> <Header size='medium'>Member Details</Header>
<Form.Group widths='equal'>
<Form.Input
label='First Name'
fluid
required
{...makeProps('first_name')}
/>
<Form.Input
label='Last Name'
fluid
required
{...makeProps('last_name')}
/>
</Form.Group>
<Form.Input <Form.Input
label='Preferred First Name' label='Preferred First Name'
required required

View File

@ -394,6 +394,19 @@ export function AdminMemberForm(props) {
<Form onSubmit={handleSubmit}> <Form onSubmit={handleSubmit}>
<Header size='medium'>Edit Member Details</Header> <Header size='medium'>Edit Member Details</Header>
<Form.Group widths='equal'>
<Form.Input
label='First Name'
fluid
{...makeProps('first_name')}
/>
<Form.Input
label='Last Name'
fluid
{...makeProps('last_name')}
/>
</Form.Group>
<Form.Input <Form.Input
label='Email' label='Email'
{...makeProps('email')} {...makeProps('email')}