Administrative menu , user sessions limit and custom controller

Hi,
i’m a new user of this incredibile platform … i’m trying all features of platform that I’m trying to plan several projects, so, i have a couple of questions

my actual scenario is customizing the sales sample application (added a bunch of new entity, modified some existing entities, enabled RESP API modules etc etc)

how can i

  1. enable administrative menu only for admin users ?
  2. limits the user session up to 20
  3. add custom rest controller (i have to enable “portal module” into Cuba Studio project ?)
  4. add soap service
  5. deploy application to “remote tomcat server”

I apologize for the many questions but I’m really excited by this platform :slight_smile:

Saro

1 Like

Hi,
1. enable administrative menu only for admin users ?
Screen restrictions could be set up for roles. To deny Administrative menu for users:
a) create a role (administration->Roles)
b) on the Screens tab set “Deny” for the Administration menu
c) assign the role to new users
For more info see the following documentation:
https://doc.cuba-platform.com/manual-6.2/roles.html
https://doc.cuba-platform.com/manual-6.2/roles_example.html

2. limits the user session up to 20
The sample project, which illustrates login restrictions is available here https://github.com/cuba-platform/sample-login-restrictions
It also could be downloaded by Studio: find it on the Samples tab.
As we see, count of already logged in users could be determined by calling the UserSessionsAPI.getUserSessionInfo().size()

3. add custom rest controller (i have to enable “portal module” into Cuba Studio project ?)
Information about CUBA REST API you can find in the documentation:
https://doc.cuba-platform.com/manual-6.2/rest_api.html

4. add soap service
Please, see the following topic https://www.cuba-platform.com/discuss/t/best-practice-to-consume-soap-services

5. deploy application to "remote tomcat server"
a) Application could be simply deployed from WAR using the tomcat manager (if it was installed). The information of how to create WAR with your CUBA-application is here: https://doc.cuba-platform.com/manual-6.2/build.gradle_buildWar.html
b) WAR deployment to tomcat on Windows is described here: https://doc.cuba-platform.com/manual-6.2/tomcat_war_deployment.html
c) The application could also be deployed by copying files to the tomcat server. How to make it on Windows has been described in the following topic:
https://www.cuba-platform.com/discuss/t/tomcat-as-a-windows-service

Also, Studio has an instrument for deployment straight to the Jelastic cloud: https://doc.cuba-platform.com/manual-6.2/jelastic_deployment.html
Two cloud providers (Mirhosting and Layershift) give special conditions of trial period for users registered via the Studio (open the Cloud deployment settings page and you will see the registration panel): trial period is enlarged to 30 days and more cloud resources are available for free. So more powerful environments might be used to test and run your CUBA-applications.

Hope, this will help. Regards.

2 Likes

Hi Rostislav,
thanks for your response

  1. enable administrative menu only for admin users ?
    ok

  2. limits the user session up to 20
    ok

  3. add custom rest controller (i have to enable “portal module” into Cuba Studio project ?)
    ok

  4. add soap service
    ok, here I expressed myself badly … I meant how to add a SOAP interface to my web application, and then what class i have to override or add into projct via IDE ?

anyway, for consuming SOAP o REST service i have to create a bean for my application ?

  1. deploy application to "remote tomcat server"
    thanks, i will try

very helpfull … thanks
Saro