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

Issue#3: Confidentiality configurable through space admin configuration #5

Open
wants to merge 6 commits into
base: master
from

Conversation

@Augustyn
Copy link
Contributor

commented Jul 22, 2019

Rest table for: adding, removing and updating confidentiality options.
Added velocity page that allows confidentiality options change, and back-end logic that populates admin configuration page. Acting only as a basic html template. Will display page as a space plugin configuration.
Added JS and rest controller to be able to easy modify confidentiality options.
Added JS to really disable confidentiality for given space (hide confidentiality options).

Default confidentiality options are in confluence-confidentiality.properties file.

Fix: issue#3: Confidentiality options are now configurable through sp…
…ace admin configuration.

Added velocity page that allows confidentiality options change, and backend logic.
Added js and rest controller to be able to modify confidentiality
options

@Augustyn Augustyn force-pushed the Augustyn:master branch from 9fa601b to 64004de Jul 22, 2019

Augustyn added 4 commits Jul 22, 2019
Impr: issue#3: Improvements to default confidentiality list: now it's…
… based on property list. Storing and retrieving RestTable model fixed.
Issue#3: Impr: added possibility to enable/disable confidentiality fo…
…r space.

Removed button in favour prettier toggle, AUI Atlassian.
Saving confidentiality now recounts list IDs.
Page confidentiality now takes into account if plugin is enabled for space, or not.

@Augustyn Augustyn changed the title WIP: issue#3: Confidentiality configurable through space admin configuration Issue#3: Confidentiality configurable through space admin configuration Jul 24, 2019

@Augustyn

This comment has been minimized.

Copy link
Contributor Author

commented Jul 24, 2019

@thde I don't think that Travis should NOT be trying to compile with Java 11. Confluence itself is still compiled against Java 8, and that version should be target. It should run on Java 11, but still be compiled with 8. Master from my clone builds: https://travis-ci.org/Augustyn/confluence-confidentiality/builds/563069545

@thde

This comment has been minimized.

Copy link
Contributor

commented Aug 9, 2019

Yep. Do you want to change the version directly in this PR? Would be perfect :).

@Augustyn

This comment has been minimized.

Copy link
Contributor Author

commented Aug 22, 2019

@thde in my repository I configured Travis to use JDK 8, but it seems it building from your configuration, against JDK 11. I fixed building so it would build both on JDK 11 and 8, though confluence itself won't run on JDK 11 (Apache starts, but serves blank confluence page).

@thde

This comment has been minimized.

Copy link
Contributor

commented Aug 22, 2019

I'll change the .travis.yml by myself then. For now there is no version specified so it uses the latest one.

I'll sadly not be able to have a look at it till beginning of september...

@Augustyn

This comment has been minimized.

Copy link
Contributor Author

commented Aug 22, 2019

I don't know why your Travis is using JDK 11, because for my clone, having the same Travis configuration it uses 1.8. Maybe because of I've set maven.compiler.source and maven.compiler.target in pom?

@thde
Copy link
Contributor

left a comment

I had a look at the JS code and added some suggestions regarding the spelling. I still need to look over the backend part.

@@ -4,6 +4,25 @@ This is a Confluence plugin that provides a confidentiality setting for each pag

![A screenshot of the plugin in action](https://i.imgur.com/w0T7zKF.png)

# Space confidentiality configuration
By default plugin is not enabled for any space.

This comment has been minimized.

Copy link
@thde

thde Sep 10, 2019

Contributor
Suggested change
By default plugin is not enabled for any space.
By default the plugin is not enabled for any space.
@@ -4,6 +4,25 @@ This is a Confluence plugin that provides a confidentiality setting for each pag

![A screenshot of the plugin in action](https://i.imgur.com/w0T7zKF.png)

# Space confidentiality configuration
By default plugin is not enabled for any space.
One have to enable it by going to either: Space Tools -> Addons, or Space menu -> Confidentiality

This comment has been minimized.

Copy link
@thde

thde Sep 10, 2019

Contributor
Suggested change
One have to enable it by going to either: Space Tools -> Addons, or Space menu -> Confidentiality
One has to enable it by 'Space Tools -> Addons' or 'Space menu -> Confidentiality'.
By default plugin is not enabled for any space.
One have to enable it by going to either: Space Tools -> Addons, or Space menu -> Confidentiality

![Space menu](space_menu.png)

This comment has been minimized.

Copy link
@thde

thde Sep 10, 2019

Contributor

This will be uploaded to the root folder? I'd favor a sub folder or hosting it elsewhere (for example Imgur).


![Space menu](space_menu.png)

Option is visible only for space admin.

This comment has been minimized.

Copy link
@thde

thde Sep 10, 2019

Contributor
Suggested change
Option is visible only for space admin.
The option is visible only for the space admin.

Option is visible only for space admin.

Space confidentiality options can be set after enabling confidentiality for space:

This comment has been minimized.

Copy link
@thde

thde Sep 10, 2019

Contributor
Suggested change
Space confidentiality options can be set after enabling confidentiality for space:
Space confidentiality options can only be set after enabling confidentiality for the space:
const capitalize = str => str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
const url = `${AJS.contextPath()}/rest/confluence-confidentiality/1.0/administer/confidentiality/${AJS.Meta.get("space-key")}`;

function ConfidentialityTable() {

This comment has been minimized.

Copy link
@thde

thde Sep 10, 2019

Contributor
Suggested change
function ConfidentialityTable() {
const confidentialityTable = () => {
deleteConfirmationCallback: (model) => {
AJS.$("#restful-table-model")[0].innerHTML = `Are you really sure you want to remove confidentiality option: '${model.id}'?`;
AJS.dialog2("#delete-confirmation-dialog").show();
return new Promise(function (resolve, reject) {

This comment has been minimized.

Copy link
@thde

thde Sep 10, 2019

Contributor
Suggested change
return new Promise(function (resolve, reject) {
return new Promise((resolve, reject) => {
AJS.$("#restful-table-model")[0].innerHTML = `Are you really sure you want to remove confidentiality option: '${model.id}'?`;
AJS.dialog2("#delete-confirmation-dialog").show();
return new Promise(function (resolve, reject) {
AJS.$("#dialog-submit-button").on('click', function (e) {

This comment has been minimized.

Copy link
@thde

thde Sep 10, 2019

Contributor
Suggested change
AJS.$("#dialog-submit-button").on('click', function (e) {
AJS.$("#dialog-submit-button").on('click', e => {
e.preventDefault();
AJS.dialog2("#delete-confirmation-dialog").hide();
});
AJS.$(".aui-dialog2-header-close, #warning-dialog-cancel").on('click', function (e) {

This comment has been minimized.

Copy link
@thde

thde Sep 10, 2019

Contributor
Suggested change
AJS.$(".aui-dialog2-header-close, #warning-dialog-cancel").on('click', function (e) {
AJS.$(".aui-dialog2-header-close, #warning-dialog-cancel").on('click', e => {
noEntriesMessage: "No confidentiality options.",
deleteConfirmation: true,
deleteConfirmationCallback: (model) => {
AJS.$("#restful-table-model")[0].innerHTML = `Are you really sure you want to remove confidentiality option: '${model.id}'?`;

This comment has been minimized.

Copy link
@thde

thde Sep 10, 2019

Contributor
Suggested change
AJS.$("#restful-table-model")[0].innerHTML = `Are you really sure you want to remove confidentiality option: '${model.id}'?`;
AJS.$("#restful-table-model")[0].innerHTML = `Are you really sure you want to remove the confidentiality option: '${model.id}'?`;

This comment has been minimized.

Copy link
@thde

thde Sep 10, 2019

Contributor

I'd even move the callback out:

const deleteConfirmation = model => {}
deleteConfirmationCallback: deleteConfirmation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.