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
Fixes #28781 - Disable Auto attach on Host #8529
Conversation
Issues: #28781 |
This commit does a couple of things 1) It disables auto attach setup in Simple Content Access enabled orgs. 2) It sets it auto attach status to 'Not Applicable' 3) Changed contentAccessMode=== 'org_enviroment' to 'simpleContentAccessEnabled' when Simple Content Access is enabled.
e990184
to
3b60616
Compare
I am seeing the content access mode banner for hosts and host collections which are not simple content enabled. |
ah found the issue. good catch :) . Updated the PR. This should not occur anymore |
@@ -7,7 +7,7 @@ describe('Directive: contentAccessModeBanner', function() { | |||
)); | |||
|
|||
beforeEach(module(function($provide) { | |||
$provide.value('contentAccessMode', 'org_environment'); | |||
$provide.value('simContentAccessEnabled', true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'simple' :)
@@ -82,12 +82,12 @@ <h4 translate>Subscriptions</h4> | |||
</dd> | |||
|
|||
<dt translate>Auto-Attach</dt> | |||
<dd bst-edit-checkbox="host.subscription_facet_attributes.autoheal" | |||
<dd ng-if= "simpleContentAccessEnabled" translate> Not Applicable </dd> | |||
<dd ng-if= "!simpleContentAccessEnabled" bst-edit-select="host.subscription_facet_attributes.autoheal" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@parthaa I see Not Applicable
for hosts which are not simple content access enabled. I feel that this is incorrect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm I don't see this behaviour. Can you pull and try again.
<span translate>Auto-Attach</span> | ||
</button> | ||
|
||
<p class="help-text" ng-show="table.numSelected === 0 && contentAccessMode != 'org_environment'"> | ||
<p class="help-text" ng-show="table.numSelected === 0 && !simpleContentAccessEnabled'"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@parthaa There is an unbalanced single quote near simpleContentAccessEnabled
which is breaking the functionality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch
@@ -18,7 +18,7 @@ | |||
angular.module('Bastion.features').value('FeatureSettings', angular.fromJson(<%= SETTINGS[:features].nil? ? {} : SETTINGS[:features].to_json.html_safe %>)); | |||
angular.module('Bastion').value('currentLocale', '<%= I18n.locale %>'); | |||
angular.module('Bastion').value('CurrentOrganization', "<%= Organization.current.id if Organization.current %>"); | |||
angular.module('Bastion').value('contentAccessMode', "<%= Organization.current.try(:content_access_mode) if Organization.current %>"); | |||
angular.module('Bastion').value('simpleContentAccessEnabled', "<%= Organization.current.simple_content_access? if Organization.current %>") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a missing semi colon in this line and an extra space right before "<%= Organization.current.simple_content_access?
@@ -7,7 +7,7 @@ describe('Directive: contentAccessModeBanner', function() { | |||
)); | |||
|
|||
beforeEach(module(function($provide) { | |||
$provide.value('contentAccessMode', 'org_environment'); | |||
$provide.value('simContentAccessEnabled', true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a typo in line10 which is causing the tests to fail.
Tested the functionality and it is working as expected in both Host and Host collections. |
@@ -18,7 +18,7 @@ | |||
angular.module('Bastion.features').value('FeatureSettings', angular.fromJson(<%= SETTINGS[:features].nil? ? {} : SETTINGS[:features].to_json.html_safe %>)); | |||
angular.module('Bastion').value('currentLocale', '<%= I18n.locale %>'); | |||
angular.module('Bastion').value('CurrentOrganization', "<%= Organization.current.id if Organization.current %>"); | |||
angular.module('Bastion').value('contentAccessMode', "<%= Organization.current.try(:content_access_mode) if Organization.current %>"); | |||
angular.module('Bastion').value('simpleContentAccessEnabled', <%= Organization.current.simple_content_access? if Organization.current %>) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An extra space in front of <%= Organization and a semi-colon is missing in this statement. Just to be consistent :)
Apart from this the PR looks good.
APJ 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM per Swetha's testing!
* Fixes #28781 - Disable Auto attach on Host This commit does a couple of things 1) It disables auto attach setup in Simple Content Access enabled orgs. 2) It sets it auto attach status to 'Not Applicable' 3) Changed contentAccessMode=== 'org_enviroment' to 'simpleContentAccessEnabled' when Simple Content Access is enabled. (cherry picked from commit 97589ec)
* Fixes #28781 - Disable Auto attach on Host This commit does a couple of things 1) It disables auto attach setup in Simple Content Access enabled orgs. 2) It sets it auto attach status to 'Not Applicable' 3) Changed contentAccessMode=== 'org_enviroment' to 'simpleContentAccessEnabled' when Simple Content Access is enabled. (cherry picked from commit 97589ec)
This commit does a couple of things
'simpleContentAccessEnabled' when Simple Content Access is enabled.