Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Session handling #902

Merged
merged 31 commits into from
Aug 31, 2018
Merged

Session handling #902

merged 31 commits into from
Aug 31, 2018

Conversation

bjoernricks
Copy link
Contributor

Renew the users session after interaction with a details or list page.

Also do some cleanups.

Pass renewSessionTimeout to the start dashboard(s).
Its more readable if all proptype definitions are at the bottom of the
corresponding component.
dashboard prop now expects a function and will replaces the current
dashboard2 prop. dashboard2 prop wil be removed in future.
Don't renew the session in Dashboard and DashboardControls directly.
Instead add a new handler function that is called after user
interaction.

This removes the business logic from both components and puts the upper
layer in responsibility for session renewal.
This will allow to renew the user session via calling onInteraction. The
function will be forwarded to the Dashboard components in future.
Pass props orignated from EntitesContainer directly to the dashboards
and not implicitly via forwarding in EntitesPage. Always use dashboard
prop as render prop. Use dashboard prop instead of dashboard2.
Add onInteraction handler to dashbaord and dashboardcontrol components.
Renew the user session on user interaction at the scans, secinfo and
assets overview dashboards.
Also don't forward any prop to the dashboard function anymore. This is
obsolete now.
Instead add a handler to act on user interaction. This will allow to
update the user session only in EntitesContainer.
The changed handler is not explicitly called after user interaction.
Therefore it should not renew the users session.

The current behavior in EntitesContainer is still a mix of implicit and
explicit user interaction. E.g. onFilterXyz is renewing the session but
is called only implicitly after user interaction at the powerfilter.
This may change in future by passing onInteraction down the component
tree.
The handler is called when an entity is cloned, deleted, downloaded and
saved.
This will renew the user session if a task is cloned, downloaded,
deleted and saved.
Pass gmp as single argument.
Drop old handleInteraction method and rename renewSession to
handleInteraction. Require an onInteraction handler prop this is called
at handleInteraction.
Raise a proptype warning if the handler is missing. The handler isn't
really required for the components but if it is missing it's a bug in
the application.
If the user changes the active tab on a entity page call the
onInteraction handler.
Renew the user session if a user interacts with a list or details page
@codecov
Copy link

codecov bot commented Aug 31, 2018

Codecov Report

Merging #902 into master will decrease coverage by 0.1%.
The diff coverage is 0.15%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #902      +/-   ##
=========================================
- Coverage    7.48%   7.37%   -0.11%     
=========================================
  Files         824     824              
  Lines       26470   26845     +375     
  Branches     5668    5693      +25     
=========================================
  Hits         1980    1980              
- Misses      22116   22464     +348     
- Partials     2374    2401      +27
Impacted Files Coverage Δ
gsa/src/web/pages/credentials/detailspage.js 0% <ø> (ø) ⬆️
gsa/src/web/pages/scanconfigs/detailspage.js 0% <ø> (ø) ⬆️
gsa/src/web/pages/permissions/detailspage.js 0% <ø> (ø) ⬆️
gsa/src/web/pages/results/detailspage.js 0% <ø> (ø) ⬆️
gsa/src/web/pages/targets/detailspage.js 0% <ø> (ø) ⬆️
gsa/src/web/pages/filters/detailspage.js 0% <ø> (ø) ⬆️
gsa/src/web/pages/hosts/detailspage.js 0% <ø> (ø) ⬆️
gsa/src/web/pages/tags/detailspage.js 0% <ø> (ø) ⬆️
gsa/src/web/pages/reports/listpage.js 0% <0%> (ø) ⬆️
gsa/src/web/pages/reportformats/listpage.js 0% <0%> (ø) ⬆️
... and 103 more

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 de836e1...2028b93. Read the comment docs.

@swaterkamp swaterkamp merged commit cc47078 into greenbone:master Aug 31, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants