Implementing Login and access controls

Hello all,

I want to restrict my website so that any access to the pages must be made by an authenticated user. Any unauthorized access should be denied. How can I achieve that?

Hamisi

There is no any specific solution for Webix components, as they are just interface blocks. The access control is the task for the app level framework.

If you are using Webix Jet, then there is a helper, that blocks access to the app-level views for not logged yet users.

Hello Maksim,

Thanks for this clarification. Is helper part of the download?

Hamisi

I tried using that plugin for Webix Jet (libs/webix-mvc-core/plugins/user) but when I try, I keep getting a ‘Script error for: libs/routie’. I cannot figure out why.

Is there an example of how to use this plugin to require users to be logged in?

Sorry, found out why:

libs/webix-mvc-core/plugins/user.js requires ‘libs/routie’.
However, this is not present, instead it should require ‘libs/routie/dist/routie’.

Still, an example would be nice :slight_smile:

Hello gartneriet,

Thanks for this clarification. Please share with me an example on how you implemented yours.

Thanks,

Hamisi

Hello,

Has anyone got a sample of using libs/webix-mvc-core/plugins/user plugin?

Thanking you in advance.

Hamisi

I would like to see an example too. And a description of the logic and reason behind it.

I would be interested, too…

I have it working in my app here. I will try to make it public somehow…

Hello gartneriet,

You can also email it to me. My email address is malipula@gmail.com

Thanks,

Hamisi

I will try to get it on github I think. Problem right now is to get it somewhat documentet. Will try to look at it this evening.

Take a look at this:

It is basically just the webix-app-start application with a slightly modified user-plugin and a user-model that implements the login.

(I’m using it to login to an Apigility-oauth server, to get an access-token.)

Hello gartneriet,

Thanks very much for sharing. I will download and look at it right away.

Thanks again for helping.

Hamisi

Your help is greatly appreciated, Mads! :slight_smile: