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

Guest user #1246

Merged
merged 13 commits into from
Apr 2, 2019
Merged

Guest user #1246

merged 13 commits into from
Apr 2, 2019

Conversation

bjoernricks
Copy link
Contributor

@bjoernricks bjoernricks commented Apr 2, 2019

Support for guest user login. With this change a config.js file with the following content

config = {
    guestUsername: 'foo',
    guestPassword: 'bar',
}

can be provided to activate a Login as Guest button at the login page. To actually use this user
a user with the role Guest and the specified username/password combination must be created.

Important: It is not checked if the user is a restricted guest user. It would also be possible to auto login via a super admin user!

Additionally by adding a disableLoginForm: true to the config object in the config.js file it is possible to deactivate the normal login form at the login page to only provide the Login as Guest button.

Checklist:

This allows to provide login information for a guest user.
Show a guest login button at the login page if guestUsername and
guestPassword are set in the config.js file.

Also move the Wrapper to the LoginForm component.
Allow to disable displaying the login form by setting

config = {
  disableLoginForm: true,
}

in the config.js file.
Allow to enable/disbale the protocol insecure warning at the LoginForm
by passing a showProtocolInsecure prop. By default the warning isn't
shown.
Normally it's a mistake if they are missing. Therefore issue a prop
warning in that case.
autocomplete hints are used by the browser to autofill the fields.
@bjoernricks bjoernricks changed the base branch from master to gsa-8.0 April 2, 2019 13:34
@bjoernricks bjoernricks marked this pull request as ready for review April 2, 2019 13:34
@bjoernricks bjoernricks requested a review from a team April 2, 2019 13:34
@codecov
Copy link

codecov bot commented Apr 2, 2019

Codecov Report

Merging #1246 into gsa-8.0 will increase coverage by 0.16%.
The diff coverage is 58.62%.

Impacted file tree graph

@@             Coverage Diff             @@
##           gsa-8.0    #1246      +/-   ##
===========================================
+ Coverage    17.35%   17.52%   +0.16%     
===========================================
  Files          950      950              
  Lines        27628    27630       +2     
  Branches      5959     5969      +10     
===========================================
+ Hits          4795     4841      +46     
+ Misses       21387    21344      -43     
+ Partials      1446     1445       -1
Impacted Files Coverage Δ
gsa/src/web/pages/login/loginpage.js 0% <0%> (ø) ⬆️
gsa/src/web/pages/login/loginform.js 89.18% <100%> (+89.18%) ⬆️
gsa/src/gmp/gmpsettings.js 100% <100%> (ø) ⬆️
gsa/src/web/utils/urls.js 85.71% <0%> (+42.85%) ⬆️
gsa/src/web/components/img/img.js 100% <0%> (+100%) ⬆️
gsa/src/web/components/img/product.js 100% <0%> (+100%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1e36997...d40dc83. Read the comment docs.

@swaterkamp swaterkamp merged commit 84d3120 into greenbone:gsa-8.0 Apr 2, 2019
@bjoernricks bjoernricks deleted the guest-user branch April 2, 2019 14:06
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.

2 participants