Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RDISCROWD-7338 project password --> assign user to project #459

Merged
merged 8 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions templates/projects/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@
<div id="annotation_config" class="col-md-4">
{{ render_project_card_option(project, upload_method, title=_('Annotation Settings'), explanation=_('Configure parameters related to annotation'), link=url_for('project.annotation_config', short_name=project.short_name), link_action_text=_('Annotation'), icon='cogs')}}
</div>
{% if private_instance %}
<div id="assign_users_to_project" class="col-md-4">
{{ render_project_card_option(project, upload_method, title=_('Assign Users To Project'), explanation=_('Assign users to project based on matching data access levels'), link=url_for('project.assign_users', short_name=project.short_name), link_action_text=_('Assign Users'), icon='users')}}
</div>
{% endif %}

{% endif %}
</div>

Expand Down
8 changes: 8 additions & 0 deletions templates/projects/update.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@ <h3>{{_('Enable project syncing')}}</h3>
</div>
</fieldset>
</form>
<br>
<form id="remove-password-form" method="post" action="{{ url_for('project.remove_password', short_name = project.short_name) }}">
Copy link

@kbecker42 kbecker42 Jul 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can probably include a conditional per here:

{% if !config.get('PROJECT_PASSWORD_REQUIRED') %}
  <form id="remove-password-form" method="post" action="{{ url_for('project.remove_password', short_name = project.short_name) }}">
      <div class="form-actions">
          <input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
          <input type="hidden" name="password" value="" />
          <button type="submit" class="btn btn-link" value="Remove Project Password">{{_('Remove Project Password')}}</button>
      </div>
  </form>
{% endif %}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch! Implemented via b613336

<div class="form-actions">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<input type="hidden" name="password" value="" />
<button type="submit" class="btn btn-link" value="Remove Project Password">{{_('Remove Project Password')}}</button>
</div>
</form>

<h3>{{_('Project secret key')}}</h3>
<div class="input-group">
Expand Down
Loading