mirror of
https://github.com/documize/community.git
synced 2025-08-02 20:15:26 +02:00
Improve Space permissions
Closes out loopholes that allowed managers to kick owners.
This commit is contained in:
parent
09635b67ab
commit
5d632712e0
30 changed files with 1015 additions and 877 deletions
|
@ -143,7 +143,7 @@
|
|||
<p>Requests can take up to 24 hours to process.</p>
|
||||
{{#link-to 'customize.backup' class="btn btn-success"}}PERFORM BACKUP{{/link-to}}
|
||||
<div class="button-gap" />
|
||||
<button class="btn btn-danger" {{action 'onDeactivate'}}>REQUEST ACCOUNT CLOSURE</button>
|
||||
<button class="btn btn-danger" {{action 'onRequestClosure'}}>CLOSE ACCOUNT</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -151,16 +151,37 @@
|
|||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
<div id="deactivation-modal" class="modal" tabindex="-1" role="dialog">
|
||||
<div id="deactivation-request-modal" class="modal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">Request Account Closure</div>
|
||||
<div class="modal-body">
|
||||
<form {{action "onEditComment" on="submit"}}>
|
||||
<div class="form-group">
|
||||
<label for="the-comment">Comment</label>
|
||||
{{focus-textarea id="close-comment" class="form-control" rows="5" value=comment}}
|
||||
<small class="form-text text-muted">We always welcome product feedback</small>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">Cancel</button>
|
||||
<button type="button" class="btn btn-danger" onclick={{action 'onDeactivate'}}>Close Account</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="deactivation-confirmation-modal" class="modal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">Deactivation Requested</div>
|
||||
<div class="modal-body">
|
||||
<p>Your request has been sent and will be processed shortly.</p>
|
||||
<p>If you haven't already, perform a backup to download all your data.</p>
|
||||
<p>If you haven't already, please run a backup to download all your data.</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">ok</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
58
gui/app/templates/components/customize/space-admin.hbs
Normal file
58
gui/app/templates/components/customize/space-admin.hbs
Normal file
|
@ -0,0 +1,58 @@
|
|||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="view-customize">
|
||||
<h1 class="admin-heading">Manage Spaces</h1>
|
||||
<h2 class="sub-heading">Delete spaces, take ownership of shared spaces and orphaned spaces</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="view-customize my-5">
|
||||
{{#if spaces}}
|
||||
<button type="button" class="btn btn-success" onclick={{action 'onExport'}}>Export content</button>
|
||||
<div class="space-list">
|
||||
{{#each spaces as |space|}}
|
||||
<div class="space row">
|
||||
<div class="col-12 col-sm-8">
|
||||
{{#link-to 'folder' space.id space.slug class="alt"}}{{space.name}}{{/link-to}}
|
||||
</div>
|
||||
<div class="col-12 col-sm-4 text-right">
|
||||
<div id="space-ownership-button-{{space.id}}" class="button-icon-gray align-middle" data-toggle="tooltip" data-placement="top" title="Add myself as space owner" {{action "onOwner" space.id}}>
|
||||
<i class="material-icons" data-toggle="modal">person_add</i>
|
||||
</div>
|
||||
<div class="button-icon-gap" />
|
||||
<div id="space-delete-button-{{space.id}}" class="button-icon-danger align-middle" data-toggle="tooltip" data-placement="top" title="Delete space and all content" {{action "onShow" space.id}}>
|
||||
<i class="material-icons" data-toggle="modal" data-target="#space-delete-modal" data-backdrop="static">delete</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
|
||||
<div id="space-delete-modal" class="modal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">Space Deletion</div>
|
||||
<div class="modal-body">
|
||||
<form onsubmit={{action 'onDelete'}}>
|
||||
<p>Are you sure you want to delete this space and all documents?</p>
|
||||
<div class="form-group">
|
||||
<label for="delete-space-name">Please type space name to confirm</label>
|
||||
{{input type='text' id="delete-space-name" class="form-control mousetrap" placeholder="Space name" value=deleteSpace.name}}
|
||||
<small class="form-text text-muted">This will delete all documents and templates within this space!</small>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">Cancel</button>
|
||||
<button type="button" class="btn btn-danger" onclick={{action 'onDelete'}}>Delete</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
<p>There are no shared spaces to manage</p>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue