Skip to content

Conversation

@kaladay
Copy link
Contributor

@kaladay kaladay commented Jun 21, 2018

Add failsafe as public view if user role is undefined.
Weaver-UI-Core currently does not define "role" if the user is anonymous.

Non-public accounts may not have the role property assigned.
If the role is undefined, assume user is anonymous.

There is a setting 'anonymousRole' in app/config/appConfig.js.
I cannot find anywhere this is being used.

Ideally, this would need to respect the 'anonymousRole' appConfig.js setting but the solution may need to be done in Weaver-UI-Core instead of here.
This maintains the existing check for ROLE_ANONYMOUS such that if and when Weaver-UI-Core makes the mentioned change, this file need not be altered.

Add failsafe as public view if user role is undefined.
Weaver-UI-Core currently does not define "role" if the user is anonymous.

Non-public accounts may not have the role property assigned.
If the role is undefined, assume user is anonymous.

There is a setting 'anonymousRole' in app/config/appConfig.js.
I cannot find anywhere this is being used.

Ideally, this would need to respect the 'anonymousRole' appConfig.js setting but the solution may need to be done in Weaver-UI-Core instead of here.
This maintains the existing check for ROLE_ANONYMOUS such that if and when Weaver-UI-Core makes the mentioned change, this file need not be altered.
@kaladay kaladay requested review from a user and rladdusaw June 21, 2018 19:30
@coveralls
Copy link

coveralls commented Jun 21, 2018

Pull Request Test Coverage Report for Build 59

  • 2 of 4 (50.0%) changed or added relevant lines in 2 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+2.2%) to 14.501%

Changes Missing Coverage Covered Lines Changed/Added Lines %
app/controllers/dashboardController.js 2 3 66.67%
app/repo/noteRepo.js 0 1 0.0%
Files with Coverage Reduction New Missed Lines %
app/controllers/dashboardController.js 1 68.97%
Totals Coverage Status
Change from base Build 17: 2.2%
Covered Lines: 195
Relevant Lines: 1160

💛 - Coveralls

@ghost ghost merged commit 56e8601 into sprint5-staging Jul 2, 2018
@kaladay kaladay deleted the sprint5-d01186-non_public_showing_for_anonymous branch July 5, 2018 20:56
This pull request was closed.
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.

3 participants