silverstripe / silverstripe-session-manager

Allow users to manage and revoke access to multiple login sessions across devices.
BSD 3-Clause "New" or "Revised" License
9 stars 7 forks source link

UI edge cases are not accomodated #63

Open maxime-rainville opened 3 years ago

maxime-rainville commented 3 years ago

The SessionLoginField doesn't currently cater to the following edge cases:

Acceptance criteria

@silverstripeux

clarkepaul commented 3 years ago

I think that for all those situations it makes sense. @maxime-rainville for these scenarios does the section appear as empty or is it completely removed?

I would imagine there would be a message saying there is no login sessions or that area would be completely missing. My preference is that the area is present with a message but that would mean potentially different messages for different cases unless we can create a generic one.

maxime-rainville commented 3 years ago

TLDR None of those edge cases can be reached on a vanilla install of session manager, but it could be possible if third party dev give some members permissien to manage other users' sessions.

Once https://github.com/silverstripe/silverstripe-session-manager/pull/62 is merged, none of those scenarios will be possible in a vanilla install:

Things will get a little more complicated if devs decide to customise the behaviour. Assuming a scenario where you've created a role that allows you to view/manage other users session:

brynwhyman commented 3 years ago

Noting that I don't see this issue being a priority to resolve before the initial beta/ stable release.

When docs are created in #57 that outline the possibility of altering the behaviour to give privileged users access to other user sessions, we could make the recommendation that both CanView and CanDelete permissions should be provided, as a read-only view is not supported.

maxime-rainville commented 3 years ago

A quick win could just be to not display logout session when the field is read-only. That's probably a 1-2 point job and would lead to less confusion than having some convoluted explanation in the doc.