Public faced web site user registration

Hi,

I started to use the system, and try to make a simple web site which has a public side (probably portal or a simple vaadin ui) and a admin site.
I would liek to extend the built in user entity and security system to handle this.

There are several questions arised.

What is the best CUBA way to do the following?

  1. Be able to visit the public faced site and register as a public user.
  2. The admin site is unreachable for public users
  3. To have one-to-one table related to sec$users to store application specific user properties
  4. If the public site will be vaadin/cuda screen ( it is more like as the admin site), then it must be accessible anonymously and have a register and a login button to register or login the user)
  5. the admin site must be accessible on the /admin URL the root url is for the public site.

Thanks for the help.

PS: Is there any doc/reference manual for the cuba-platform only. I start to see it through on the github but it is massive…

Best Regards

Hi Sándor,

i’ll try to explain your questions as i understand them.

First of all, regarding your question about the docs - you’ll find detailed information here: https://www.cuba-platform.com/documentation

  1. this can be achieved via deploying the application with separated war files. The portal application is a war that is hosted on a server that is internet accessible, while the web application (the admin application) is hosted via a separated war on a server that is not internet accessible.

  2. to store more information about a user, you can just create Entity like “customer” or “employee” and create a “one-to-one” association to the User entity. The storage of the foreign key is on the “employee” side to not change the user entity. Another possibility would be to extend the user entity (see more information here: https://doc.cuba-platform.com/manual-6.2/entity_extension.html)

  3. / 4. i don’t see that the platform has anything like this build it. Here is an example of a portal application with AngularJS with Login functionality but without registration process. But the example can be edited in a way that allows a user registration - i don’t see a big problem here. Perhaps one could think about either giving an example of this or even built it right into the portal app.

  4. this is mostly a load balancer or a proxy server (like apache or nginx) configuration i would guess.

Btw.: welcome to CUBA land - the sun mostly shines here, so i hope you have a great time :slight_smile:

Bye,
Mario

1 Like

In case you will make the public facing website on CUBA UI: we are now working on the possibility of “anonimous usage” scenario, it will be available for the platform version 6.3 in the beginning of September.

1 Like

That sounds really coooool.

Thanks,

Sounds cool. If we don’t want build a second facebook then Vaadin/cuba screens are perfect.

Now that 6.3 is out, any updates on how to do anonymous usage? I would like a designed home page with a login and register link. The login link would pop-up the cuba login screen, the register screen would pop-up a registration screen that can create a non-admin user in the DB.

Yes, you can do this. Please see https://www.cuba-platform.com/blog/2016-10-21/621#anonymous

1 Like

I’m running into some issues actually implementing this. I have a class called ExtAppLoginWindow (ext-loginwindow.xml) that implements the screen of my anonymous home page. It extends AbstractWindow and implements TopLevelWindow.

I have the actual login window in a screen called DoLogin (do-login.xml) which gets opened when you click on a login button:


    public void onLoginMenuItemClick() {
        AppLoginWindow loginScreen = (AppLoginWindow) openWindow("do-login", WindowManager.OpenType.DIALOG);
    }

This causes a nullpointer exception because DoLogin is unable to find the settings in web-app.properties or app.properties which contain the availableLocales and when AppLoginWindow does a


Locale selectedLocale = localesSelect.getValue();
app.setLocale(selectedLocale);

You get the null pointer error. How do I get the other login window to find the available locales and potentially the default login user?

Hi,

Could you please start separate topic and attach small project that illustrates this problem?