Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

Handle sessions in one place #2026

Merged
merged 1 commit into from
Jul 1, 2020
Merged

Handle sessions in one place #2026

merged 1 commit into from
Jul 1, 2020

Conversation

ip1981
Copy link
Member

@ip1981 ip1981 commented Jun 30, 2020

This includes logging in and logging out.

logged_out is removed because "disabled" is not working with a anyway.
Can be added to the auth::Model if needed.

Closes #2030, #1805, #1737, #1735 (supersedes #1755).

sessions


This change is Reviewable

orders.perform_g_cmd(
fetch_session()
.method(fetch::Method::Delete)
.fetch(|_| GMsg::AuthProxy(Box::new(Msg::LoggedIn))),
Copy link
Member Author

@ip1981 ip1981 Jun 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A samurai without a sword is like a samurai with one, but only without one. -- Re #1805

This includes logging in and logging out.

`logged_out` is removed because "disabled" is not working with `a` anyway.
Can be added to the auth::Model if needed.

Signed-off-by: Igor Pashev <pashev.igor@gmail.com>
Copy link
Contributor

@mkpankov mkpankov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 6 of 7 files at r1, 1 of 1 files at r3.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @ip1981)


iml-gui/crate/src/auth.rs, line 33 at r3 (raw file):

    Fetched(fetch::FetchObject<Session>),
    Logout,
    LoggedIn,

Just Login to be symmetric with Logout?

@ip1981
Copy link
Member Author

ip1981 commented Jun 30, 2020

Just Login to be symmetric with Logout?

They are different: Logout is a command, LoggedIn is a result. Similar to Fetch and Fetched.

@ip1981
Copy link
Member Author

ip1981 commented Jun 30, 2020

There might be an minor issue when anonymous access is not allowed, but easy to fix if any.

@ip1981
Copy link
Member Author

ip1981 commented Jul 1, 2020

There might be an minor issue when anonymous access is not allowed, but easy to fix if any.

This happens without this patch: https://github.com/whamcloud/integrated-manager-for-lustre/issues/2030.

Also fixed by this PR :)

@ip1981 ip1981 linked an issue Jul 1, 2020 that may be closed by this pull request
model.cancel = None;

let request = fetch_session().controller(|controller| model.request_controller = Some(controller));

orders.skip().perform_cmd(request.fetch_json(Msg::Fetched));
}
Msg::SetSession(session) => {
Copy link
Member Author

@ip1981 ip1981 Jul 1, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this and this was the cause of #2030.

@ip1981 ip1981 linked an issue Jul 1, 2020 that may be closed by this pull request
@jgrund jgrund merged commit e3f1e01 into master Jul 1, 2020
@jgrund jgrund deleted the ip1981/1805-logout branch July 1, 2020 16:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants