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

Don't show share tab when selected workflow doesn't allow it. #3138

Merged
merged 2 commits into from Mar 15, 2017

Conversation

jcoyne
Copy link
Contributor

@jcoyne jcoyne commented Mar 11, 2017

It doesn't make sense to allow people to add "edit" users on a mediated
workflow where we intend to strip away everyone's edit access.

Fixes #3134

@projecthydra/sufia-code-reviewers

It doesn't make sense to allow people to add "edit" users on a mediated
workflow where we intend to strip away everyone's edit access.

Fixes #3134
@@ -84,7 +92,8 @@ describe("VisibilityComponent", function() {
beforeEach(function() {
var fixture = setFixtures(visibilityForm('<option data-visibility="authenticated" data-release-date="' + getOneYearFromToday() + '" data-release-before-date="true" selected="selected">Release in One Year to Institution AdminSet</option>'));
element = fixture.find('.visibility');
target = new control.VisibilityComponent(element);
admin_set = new AdminSetWidget(fixture.find('select'))

Choose a reason for hiding this comment

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

Missing semicolon.

@@ -72,7 +79,8 @@ describe("VisibilityComponent", function() {
beforeEach(function() {
var fixture = setFixtures(visibilityForm('<option data-release-date="' + getOneYearFromToday() + '" data-release-before-date="false" selected="selected">Release in One Year AdminSet</option>'));
element = fixture.find('.visibility');
target = new control.VisibilityComponent(element);
admin_set = new AdminSetWidget(fixture.find('select'))

Choose a reason for hiding this comment

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

Missing semicolon.

@@ -60,7 +66,8 @@ describe("VisibilityComponent", function() {
beforeEach(function() {
var fixture = setFixtures(visibilityForm('<option data-visibility="open" data-release-date="' + target.getToday() + '" data-release-before-date="false" selected="selected">Release Publicly Immediately AdminSet</option>'));
element = fixture.find('.visibility');
target = new control.VisibilityComponent(element);
admin_set = new AdminSetWidget(fixture.find('select'))

Choose a reason for hiding this comment

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

Missing semicolon.

@@ -48,7 +53,8 @@ describe("VisibilityComponent", function() {
beforeEach(function() {
var fixture = setFixtures(visibilityForm('<option data-release-date="' + target.getToday() + '" data-release-before-date="false" selected="selected">Release Immediately AdminSet</option>'));
element = fixture.find('.visibility');
target = new control.VisibilityComponent(element);
admin_set = new AdminSetWidget(fixture.find('select'))

Choose a reason for hiding this comment

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

Missing semicolon.

@@ -36,7 +40,8 @@ describe("VisibilityComponent", function() {
beforeEach(function() {
var fixture = setFixtures(visibilityForm('<option data-visibility="authenticated" selected="selected">Institution-Only AdminSet</option>'));
element = fixture.find('.visibility');
target = new control.VisibilityComponent(element);
admin_set = new AdminSetWidget(fixture.find('select'))

Choose a reason for hiding this comment

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

Missing semicolon.


beforeEach(function() {
var fixture = setFixtures(visibilityForm(''));
element = fixture.find('.visibility');
target = new control.VisibilityComponent(element);
admin_set = new AdminSetWidget(fixture.find('select'))

Choose a reason for hiding this comment

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

Missing semicolon.

'<aside id="form-progress"><ul><li id="required-metadata"><li id="required-files"></ul>' +
'<input type="checkbox" name="agreement" id="agreement" value="1" required="required" checked="checked" />' +
'<input type="submit"></aside></form>');
target = new control.SaveWorkControl(fixture.find('#form-progress'));
admin_set = new AdminSetWidget(fixture.find('select'))

Choose a reason for hiding this comment

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

Missing semicolon.

var element = $("[data-behavior='work-form']")
if (element.length > 0) {
var Editor = require('sufia/editor');
new Editor(element)

Choose a reason for hiding this comment

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

Missing semicolon.

var sw = require('sufia/save_work/save_work_control');
var control = new sw.SaveWorkControl($("#form-progress"))
editor: function () {
var element = $("[data-behavior='work-form']")

Choose a reason for hiding this comment

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

Missing semicolon.

@@ -84,7 +92,8 @@ describe("VisibilityComponent", function() {
beforeEach(function() {
var fixture = setFixtures(visibilityForm('<option data-visibility="authenticated" data-release-date="' + getOneYearFromToday() + '" data-release-before-date="true" selected="selected">Release in One Year to Institution AdminSet</option>'));
element = fixture.find('.visibility');
target = new control.VisibilityComponent(element);
admin_set = new AdminSetWidget(fixture.find('select'))

Choose a reason for hiding this comment

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

Missing semicolon.

@@ -72,7 +79,8 @@ describe("VisibilityComponent", function() {
beforeEach(function() {
var fixture = setFixtures(visibilityForm('<option data-release-date="' + getOneYearFromToday() + '" data-release-before-date="false" selected="selected">Release in One Year AdminSet</option>'));
element = fixture.find('.visibility');
target = new control.VisibilityComponent(element);
admin_set = new AdminSetWidget(fixture.find('select'))

Choose a reason for hiding this comment

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

Missing semicolon.

@@ -60,7 +66,8 @@ describe("VisibilityComponent", function() {
beforeEach(function() {
var fixture = setFixtures(visibilityForm('<option data-visibility="open" data-release-date="' + target.getToday() + '" data-release-before-date="false" selected="selected">Release Publicly Immediately AdminSet</option>'));
element = fixture.find('.visibility');
target = new control.VisibilityComponent(element);
admin_set = new AdminSetWidget(fixture.find('select'))

Choose a reason for hiding this comment

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

Missing semicolon.

@@ -48,7 +53,8 @@ describe("VisibilityComponent", function() {
beforeEach(function() {
var fixture = setFixtures(visibilityForm('<option data-release-date="' + target.getToday() + '" data-release-before-date="false" selected="selected">Release Immediately AdminSet</option>'));
element = fixture.find('.visibility');
target = new control.VisibilityComponent(element);
admin_set = new AdminSetWidget(fixture.find('select'))

Choose a reason for hiding this comment

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

Missing semicolon.

@@ -36,7 +40,8 @@ describe("VisibilityComponent", function() {
beforeEach(function() {
var fixture = setFixtures(visibilityForm('<option data-visibility="authenticated" selected="selected">Institution-Only AdminSet</option>'));
element = fixture.find('.visibility');
target = new control.VisibilityComponent(element);
admin_set = new AdminSetWidget(fixture.find('select'))

Choose a reason for hiding this comment

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

Missing semicolon.


beforeEach(function() {
var fixture = setFixtures(visibilityForm(''));
element = fixture.find('.visibility');
target = new control.VisibilityComponent(element);
admin_set = new AdminSetWidget(fixture.find('select'))

Choose a reason for hiding this comment

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

Missing semicolon.

'<aside id="form-progress"><ul><li id="required-metadata"><li id="required-files"></ul>' +
'<input type="checkbox" name="agreement" id="agreement" value="1" required="required" checked="checked" />' +
'<input type="submit"></aside></form>');
target = new control.SaveWorkControl(fixture.find('#form-progress'));
admin_set = new AdminSetWidget(fixture.find('select'))

Choose a reason for hiding this comment

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

Missing semicolon.

var element = $("[data-behavior='work-form']")
if (element.length > 0) {
var Editor = require('sufia/editor');
new Editor(element)

Choose a reason for hiding this comment

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

Missing semicolon.

var sw = require('sufia/save_work/save_work_control');
var control = new sw.SaveWorkControl($("#form-progress"))
editor: function () {
var element = $("[data-behavior='work-form']")

Choose a reason for hiding this comment

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

Missing semicolon.

@@ -84,7 +92,8 @@ describe("VisibilityComponent", function() {
beforeEach(function() {
var fixture = setFixtures(visibilityForm('<option data-visibility="authenticated" data-release-date="' + getOneYearFromToday() + '" data-release-before-date="true" selected="selected">Release in One Year to Institution AdminSet</option>'));
element = fixture.find('.visibility');
target = new control.VisibilityComponent(element);
admin_set = new AdminSetWidget(fixture.find('select'))

Choose a reason for hiding this comment

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

Missing semicolon.

@@ -72,7 +79,8 @@ describe("VisibilityComponent", function() {
beforeEach(function() {
var fixture = setFixtures(visibilityForm('<option data-release-date="' + getOneYearFromToday() + '" data-release-before-date="false" selected="selected">Release in One Year AdminSet</option>'));
element = fixture.find('.visibility');
target = new control.VisibilityComponent(element);
admin_set = new AdminSetWidget(fixture.find('select'))

Choose a reason for hiding this comment

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

Missing semicolon.

@@ -60,7 +66,8 @@ describe("VisibilityComponent", function() {
beforeEach(function() {
var fixture = setFixtures(visibilityForm('<option data-visibility="open" data-release-date="' + target.getToday() + '" data-release-before-date="false" selected="selected">Release Publicly Immediately AdminSet</option>'));
element = fixture.find('.visibility');
target = new control.VisibilityComponent(element);
admin_set = new AdminSetWidget(fixture.find('select'))

Choose a reason for hiding this comment

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

Missing semicolon.

@@ -48,7 +53,8 @@ describe("VisibilityComponent", function() {
beforeEach(function() {
var fixture = setFixtures(visibilityForm('<option data-release-date="' + target.getToday() + '" data-release-before-date="false" selected="selected">Release Immediately AdminSet</option>'));
element = fixture.find('.visibility');
target = new control.VisibilityComponent(element);
admin_set = new AdminSetWidget(fixture.find('select'))

Choose a reason for hiding this comment

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

Missing semicolon.

@@ -36,7 +40,8 @@ describe("VisibilityComponent", function() {
beforeEach(function() {
var fixture = setFixtures(visibilityForm('<option data-visibility="authenticated" selected="selected">Institution-Only AdminSet</option>'));
element = fixture.find('.visibility');
target = new control.VisibilityComponent(element);
admin_set = new AdminSetWidget(fixture.find('select'))

Choose a reason for hiding this comment

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

Missing semicolon.


beforeEach(function() {
var fixture = setFixtures(visibilityForm(''));
element = fixture.find('.visibility');
target = new control.VisibilityComponent(element);
admin_set = new AdminSetWidget(fixture.find('select'))

Choose a reason for hiding this comment

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

Missing semicolon.

'<aside id="form-progress"><ul><li id="required-metadata"><li id="required-files"></ul>' +
'<input type="checkbox" name="agreement" id="agreement" value="1" required="required" checked="checked" />' +
'<input type="submit"></aside></form>');
target = new control.SaveWorkControl(fixture.find('#form-progress'));
admin_set = new AdminSetWidget(fixture.find('select'))

Choose a reason for hiding this comment

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

Missing semicolon.

var element = $("[data-behavior='work-form']")
if (element.length > 0) {
var Editor = require('sufia/editor');
new Editor(element)

Choose a reason for hiding this comment

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

Missing semicolon.

var sw = require('sufia/save_work/save_work_control');
var control = new sw.SaveWorkControl($("#form-progress"))
editor: function () {
var element = $("[data-behavior='work-form']")

Choose a reason for hiding this comment

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

Missing semicolon.

@jcoyne
Copy link
Contributor Author

jcoyne commented Mar 11, 2017

I think we can ignore the codeclimate error. That's for Babel 6 and we're using Babel 5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants