mirror of
https://github.com/documize/community.git
synced 2025-08-02 20:15:26 +02:00
using all new permissions for securing spaces and documents
WIP
This commit is contained in:
parent
ef285c91de
commit
300b617583
51 changed files with 517 additions and 868 deletions
|
@ -1,11 +1,11 @@
|
|||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
||||
//
|
||||
// This software (Documize Community Edition) is licensed under
|
||||
// This software (Documize Community Edition) is licensed under
|
||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
||||
//
|
||||
// You can operate outside the AGPL restrictions by purchasing
|
||||
// Documize Enterprise Edition and obtaining a commercial license
|
||||
// by contacting <sales@documize.com>.
|
||||
// by contacting <sales@documize.com>.
|
||||
//
|
||||
// https://documize.com
|
||||
|
||||
|
@ -18,4 +18,4 @@ export default Ember.Route.extend(AuthenticatedRouteMixin, {
|
|||
this.transitionTo('customize.general');
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
{{layout/zone-navigation}}
|
||||
{{#layout/zone-container}}
|
||||
{{#layout/zone-sidebar}}
|
||||
<div class="sidebar-toolbar">
|
||||
</div>
|
||||
<div class="sidebar-common">
|
||||
{{layout/sidebar-intro title='Settings' message='Documize application settings'}}
|
||||
</div>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<i class="material-icons">arrow_back</i> {{model.document.name}}
|
||||
{{/link-to}}
|
||||
</div>
|
||||
{{document/document-heading document=model.document isEditor=false}}
|
||||
{{document/document-heading document=model.document}}
|
||||
{{document/block-editor document=model.document folder=model.folder block=model.block onCancel=(action 'onCancel') onAction=(action 'onAction')}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<i class="material-icons">arrow_back</i> {{model.document.name}}
|
||||
{{/link-to}}
|
||||
</div>
|
||||
{{document/document-heading document=model.document isEditor=false}}
|
||||
{{document/document-heading document=model.document}}
|
||||
{{#if hasRevisions}}
|
||||
{{document/document-history document=model.document folder=model.folder pages=model.pages
|
||||
revisions=model.revisions diff=model.diff onFetchDiff=(action 'onFetchDiff') onRollback=(action 'onRollback')}}
|
||||
|
|
|
@ -30,7 +30,7 @@ export default Ember.Route.extend(AuthenticatedRouteMixin, {
|
|||
pages: this.get('documentService').getPages(this.modelFor('document').document.get('id')),
|
||||
links: this.modelFor('document').links,
|
||||
sections: this.modelFor('document').sections,
|
||||
permissions: this.get('folderService').get('permissions')
|
||||
permissions: this.modelFor('document').permissions
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
@ -18,7 +18,6 @@ export default Ember.Route.extend(AuthenticatedRouteMixin, {
|
|||
|
||||
return Ember.RSVP.hash({
|
||||
folder: this.modelFor('folder').folder,
|
||||
isEditor: this.modelFor('folder').isEditor,
|
||||
permissions: this.modelFor('folder').permissions,
|
||||
folders: this.modelFor('folder').folders,
|
||||
documents: this.modelFor('folder').documents,
|
||||
|
|
|
@ -39,7 +39,7 @@ export default Ember.Route.extend(AuthenticatedRouteMixin, {
|
|||
folder: this.get('folder'),
|
||||
permissions: this.get('permissions'),
|
||||
folders: this.get('folderService').getAll(),
|
||||
documents: this.get('documentService').getAllByFolder(params.folder_id),
|
||||
documents: this.get('documentService').getAllBySpace(params.folder_id),
|
||||
templates: this.get('templateService').getSavedTemplates(params.folder_id)
|
||||
});
|
||||
},
|
||||
|
|
15
gui/app/pods/folder/settings/invitation/controller.js
Normal file
15
gui/app/pods/folder/settings/invitation/controller.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
||||
//
|
||||
// This software (Documize Community Edition) is licensed under
|
||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
||||
//
|
||||
// You can operate outside the AGPL restrictions by purchasing
|
||||
// Documize Enterprise Edition and obtaining a commercial license
|
||||
// by contacting <sales@documize.com>.
|
||||
//
|
||||
// https://documize.com
|
||||
|
||||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Controller.extend({
|
||||
});
|
25
gui/app/pods/folder/settings/invitation/route.js
Normal file
25
gui/app/pods/folder/settings/invitation/route.js
Normal file
|
@ -0,0 +1,25 @@
|
|||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
||||
//
|
||||
// This software (Documize Community Edition) is licensed under
|
||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
||||
//
|
||||
// You can operate outside the AGPL restrictions by purchasing
|
||||
// Documize Enterprise Edition and obtaining a commercial license
|
||||
// by contacting <sales@documize.com>.
|
||||
//
|
||||
// https://documize.com
|
||||
|
||||
import Ember from 'ember';
|
||||
import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
|
||||
|
||||
export default Ember.Route.extend(AuthenticatedRouteMixin, {
|
||||
model() {
|
||||
this.get('browser').setTitle(this.modelFor('folder').folder.get('name'));
|
||||
|
||||
return Ember.RSVP.hash({
|
||||
folder: this.modelFor('folder').folder,
|
||||
permissions: this.modelFor('folder').permissions,
|
||||
folders: this.modelFor('folder').folders
|
||||
});
|
||||
}
|
||||
});
|
1
gui/app/pods/folder/settings/invitation/template.hbs
Normal file
1
gui/app/pods/folder/settings/invitation/template.hbs
Normal file
|
@ -0,0 +1 @@
|
|||
{{folder/invite-user folders=model.folders folder=model.folder}}
|
|
@ -13,6 +13,12 @@ import Ember from 'ember';
|
|||
import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
|
||||
|
||||
export default Ember.Route.extend(AuthenticatedRouteMixin, {
|
||||
beforeModel: function (transition) {
|
||||
if (is.equal(transition.targetName, 'folder.settings.index')) {
|
||||
this.transitionTo('folder.settings.security');
|
||||
}
|
||||
},
|
||||
|
||||
model() {
|
||||
this.get('browser').setTitle(this.modelFor('folder').folder.get('name'));
|
||||
|
||||
|
|
15
gui/app/pods/folder/settings/security/controller.js
Normal file
15
gui/app/pods/folder/settings/security/controller.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
||||
//
|
||||
// This software (Documize Community Edition) is licensed under
|
||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
||||
//
|
||||
// You can operate outside the AGPL restrictions by purchasing
|
||||
// Documize Enterprise Edition and obtaining a commercial license
|
||||
// by contacting <sales@documize.com>.
|
||||
//
|
||||
// https://documize.com
|
||||
|
||||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Controller.extend({
|
||||
});
|
25
gui/app/pods/folder/settings/security/route.js
Normal file
25
gui/app/pods/folder/settings/security/route.js
Normal file
|
@ -0,0 +1,25 @@
|
|||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
||||
//
|
||||
// This software (Documize Community Edition) is licensed under
|
||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
||||
//
|
||||
// You can operate outside the AGPL restrictions by purchasing
|
||||
// Documize Enterprise Edition and obtaining a commercial license
|
||||
// by contacting <sales@documize.com>.
|
||||
//
|
||||
// https://documize.com
|
||||
|
||||
import Ember from 'ember';
|
||||
import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
|
||||
|
||||
export default Ember.Route.extend(AuthenticatedRouteMixin, {
|
||||
model() {
|
||||
this.get('browser').setTitle(this.modelFor('folder').folder.get('name'));
|
||||
|
||||
return Ember.RSVP.hash({
|
||||
folder: this.modelFor('folder').folder,
|
||||
permissions: this.modelFor('folder').permissions,
|
||||
folders: this.modelFor('folder').folders
|
||||
});
|
||||
}
|
||||
});
|
1
gui/app/pods/folder/settings/security/template.hbs
Normal file
1
gui/app/pods/folder/settings/security/template.hbs
Normal file
|
@ -0,0 +1 @@
|
|||
{{folder/permission-admin folders=model.folders folder=model.folder}}
|
|
@ -1,36 +1,33 @@
|
|||
{{#layout/zone-container}}
|
||||
|
||||
{{#layout/zone-sidebar}}
|
||||
<div class="sidebar-toolbar"></div>
|
||||
<div class="sidebar-common">
|
||||
{{layout/sidebar-intro title="Space Settings" message="Invite users and configure space permissions. Set up categories to sub-divide the space."}}
|
||||
{{layout/sidebar-intro title="Space Settings" message="Invite users, configure space permissions, and set up categories to sub-divide the space."}}
|
||||
</div>
|
||||
<div class="sidebar-wrapper">
|
||||
<div class="sidebar-menu">
|
||||
<ul class="options">
|
||||
<div class="option selected">Users</div>
|
||||
<div class="option ">Categories</div>
|
||||
{{#if isAuthProviderDocumize}}
|
||||
{{#link-to 'folder.settings.invitation' activeClass='selected' class="option" tagName="li"}}Invite{{/link-to}}
|
||||
{{/if}}
|
||||
{{#link-to 'folder.settings.security' activeClass='selected' class="option" tagName="li"}}Secure{{/link-to}}
|
||||
{{#link-to 'folder.settings.category' activeClass='selected' class="option" tagName="li"}}Organize{{/link-to}}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{{/layout/zone-sidebar}}
|
||||
|
||||
{{#layout/zone-content}}
|
||||
<div class="folder-heading">
|
||||
<h1 class="folder-title">{{model.folder.name}}</h1>
|
||||
<div class="back-to-space">
|
||||
{{#link-to 'folder' model.folder.id model.folder.slug}}
|
||||
<div class="regular-button button-gray">
|
||||
<i class="material-icons">arrow_back</i>
|
||||
<div class="name">{{model.folder.name}}</div>
|
||||
</div>
|
||||
{{/link-to}}
|
||||
</div>
|
||||
{{#link-to 'folder' model.folder.id model.folder.slug class="vertical-top"}}
|
||||
<i class="material-icons">arrow_back</i> back to space
|
||||
{{/link-to}}
|
||||
<div class="margin-top-30" />
|
||||
|
||||
{{#if isAuthProviderDocumize}}
|
||||
{{folder/invite-user folders=model.folders folder=model.folder}}
|
||||
<div class="margin-top-50" />
|
||||
{{/if}}
|
||||
{{outlet}}
|
||||
|
||||
{{folder/permission-admin folders=model.folders folder=model.folder}}
|
||||
<div class="margin-top-50" />
|
||||
{{/layout/zone-content}}
|
||||
|
||||
{{/layout/zone-content}}
|
||||
{{/layout/zone-container}}
|
|
@ -1,8 +1,7 @@
|
|||
{{layout/zone-navigation}}
|
||||
{{#layout/zone-container}}
|
||||
{{#layout/zone-sidebar}}
|
||||
{{folder/sidebar-zone folders=model noFolder=true isFolderOwner=false isEditor=false
|
||||
onAddSpace=(action 'onAddSpace')}}
|
||||
{{folder/sidebar-zone folders=model noFolder=true onAddSpace=(action 'onAddSpace')}}
|
||||
{{/layout/zone-sidebar}}
|
||||
{{#layout/zone-content}}
|
||||
{{/layout/zone-content}}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
{{layout/zone-navigation}}
|
||||
{{#layout/zone-container}}
|
||||
{{#layout/zone-sidebar}}
|
||||
<div class="sidebar-toolbar">
|
||||
</div>
|
||||
<div class="sidebar-common">
|
||||
{{layout/sidebar-intro title="Profile" message="Your user profile"}}
|
||||
</div>
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
{{#layout/zone-container}}
|
||||
{{#layout/zone-sidebar}}
|
||||
<div class="sidebar-toolbar">
|
||||
</div>
|
||||
<div class="sidebar-common">
|
||||
{{layout/sidebar-intro title="Search" message='Search across document name, contents, tags and attachment filenames'}}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue