NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: rjolda on September 02, 2024, 06:19:22 AM

Title: Sec:Level - Multiple Ranges?
Post by: rjolda on September 02, 2024, 06:19:22 AM
Hi,
I want to have multiple security level ranges - one for user  - e.g. sec:level = 100 -199 and ANOTHER for Administrators  Sec:Level 995-999.
If possible then How?
Thanks,
ROn
Title: Re: Sec:Level - Multiple Ranges?
Post by: rjolda on September 02, 2024, 12:39:39 PM
Looking at the code, I imagine I could add this code to each procedure:

! Start of "Processed Code"
! [Priority 2800]
        If ~  INRANGE(Sec:LEVEL,100,199)  or ~  INRANGE(Sec:LEVEL,995,999)
            Return -1
        end
       
! Before checking p_Stage
Does this sound correct?
Ron
Title: Re: Sec:Level - Multiple Ranges?
Post by: Jane on September 02, 2024, 01:16:12 PM
Don't know about the secwin part of it, but your code doesn't look logically correct.

Maybe
if ~ (INRANGE(Sec:LEVEL,100,199)  or INRANGE(Sec:LEVEL,995,999))
etc
Title: Re: Sec:Level - Multiple Ranges?
Post by: Richard I on September 02, 2024, 03:25:58 PM
Have a look at the Capesoft web  server example "AccessLevels"

Richard
Title: Re: Sec:Level - Multiple Ranges?
Post by: Jane on September 02, 2024, 04:00:20 PM
I don't use secwin and do my own thing for access control within web apps.

Just saying that your IF statement is logically incorrect.
Title: Re: Sec:Level - Multiple Ranges?
Post by: seanh on September 06, 2024, 03:41:35 PM
I'm curious why you would want so many levels for the same level?
Could you briefly explain? 
In the back of my mind is that for what you want to actually acheive there might be a better way
Title: Re: Sec:Level - Multiple Ranges?
Post by: Bruce on September 09, 2024, 10:42:07 PM
Hi,
I want to have multiple security level ranges - one for user  - e.g. sec:level = 100 -199 and ANOTHER for Administrators  Sec:Level 995-999.
If possible then How?

where?