Skip to content

Check of user logged all over the code #235

@regnarock

Description

@regnarock

There is currently no abstraction about the user and logging system, thus many modules that depends on it have to write lines like:

var user = Beluga.getInstance().getModuleInstance(Account).loggedUser

if (user != null) {
     \\do something
} else {
    \\handle it, more often that not by raising a typical trigger like following
    this.triggers.actionFail.dispatch({error : MissingLogin});
}

This is quite a hassle and looks like a bad design.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions