svySecurityExample version issue or bug?

Discuss all problems you have with Servoy here. It might help to mention the Servoy version and Operating System version you are using

svySecurityExample version issue or bug?

Postby pitc » Tue Apr 20, 2021 6:29 pm

In trying out the svySecurityExample in a new workspace with Servoy version 2021.03.3462 I run the solution as is in Ng Client.
I get the error
The svySecurityExample requires svySecurity version 1.3.0

However the version loaded is 1.5.0
The console errors are:
Code: Select all
WARN com.servoy.j2db.util.Debug - Permission "Administrators" is no longer found within internal security settings.
   at K:\ServoySecurityExample\svySecurity\svySecurity.js:2785 (logWarning)
   at K:\ServoySecurityExample\svySecurity\svySecurity.js:2594 (syncPermissions)
   at K:\ServoySecurityExample\svySecurity\svySecurity.js:3321
   at K:\ServoySecurityExample\svySecurity\svySecurity.js:3319
   at K:\ServoySecurityExample\svySecurityExampleLogin\svySecExLoginDeepLink.js:24 (onSolutionOpenLogin)
ERROR com.servoy.j2db.util.Debug - The svySecurityExample requires svySecurity version 1.5.0
   at K:\ServoySecurityExample\svySecurityExampleShared\svySecExAppHelper.js:50 (log)
   at K:\ServoySecurityExample\svySecurityExampleShared\svySecExAppHelper.js:38 (logError)
   at K:\ServoySecurityExample\svySecurityExampleShared\svySecExAppMgr.js:470 (onError)


The code is:
Code: Select all
    if (scopes.svySecurity.getVersion() != scopes.svySecExAppMgr.REQUIRED_SVYY_SECURITY_VERSION) {
        throw new Error('The svySecurityExample requires svySecurity version ' + scopes.svySecExAppMgr.REQUIRED_SVYY_SECURITY_VERSION);
    }

And the REQUIRED_SVYY_SECURITY_VERSION was set to 1.3.0
Changing it to 1.5.0 gave same result.
Further checks show that the method: scopes.svySecurity.getVersion() is:
Code: Select all
function getVersion() {
    return application.getVersionInfo()['svySecurity'];
}

The return value is null.
So not really a version issue then?

It might all be related to the Permissions not found Error?
The "User and Group security" under resources is not allowing me to inspect the settings. Is that normal?
How can I set up "example" group and user settings?

This all seems rather confusing!
Does the example need upgrading due to version 1.5.0 and recent changes (2021.04.07 webinar about tokens, sso etc)?
Tom
prospect-saas.com
pitc
 
Posts: 115
Joined: Thu Nov 14, 2019 2:22 pm
Location: Ottawa, Ontario, Canada

Re: svySecurityExample version issue or bug?

Postby paronne » Wed Apr 21, 2021 1:37 pm

Hi Tom,

The issue is due to the fact that the solution svySecurityExample doesn't have a resource project. If you set a resource project for the solution you will be able to access the user and group security.
Unfortunately conflicts with the resource projects aren't nice to handle.
The svySecurityExample itself hasn't been updated with the latest svySecurity indeed; i don't expect breaking changes using verison v1.5.0 of svySecurity, anyhow you can downgrade the version of svySecurity module to v1.3.0 by deleting the svySecurity module in workspace and add it again with version 1.3.0.

Regards,
Paolo
paronne
 
Posts: 202
Joined: Fri Nov 02, 2012 3:21 pm

Re: svySecurityExample version issue or bug?

Postby sean » Wed Apr 21, 2021 10:07 pm

Hi Tom,

I recommend the Servoy Sample solution, which is newer, well-maintained and demonstrates best practices.
https://github.com/Servoy/svySampleSolution

Best,
Sean
Software Engineer
Servoy USA
sean
 
Posts: 370
Joined: Mon May 21, 2007 6:26 pm
Location: USA


Return to Discuss possible Issues and Bugs

Who is online

Users browsing this forum: Google [Bot] and 13 guests