~All,
I'm hoping someone out there has faced this challenge and can speak to
it.
In a nutshell, we have the need to secure table and forms at the AU
level.
We use 13-digit AU's and in many cases we can just use a wildcard lookup
against a multi-valued user attribute (e.g. "AUControl").
The real problem lies with those users who need access to multiple
ranges of AU's which aren't necessarily contiguous.
For example, Dr. Smith needs access to AU's 101020* -> 101030*, but also
needs access to 101032* -> 101040*, as well as 101045* -> 1010459999999.
To Recap Needs:
101020* --> 101030*
101032* --> 101040*
101045* --> 1010459999999
The last item is easy enough. We can create a multi-value user
attribute, enter "101045", and then do a simple wildcard match. No
problemo.
It's the first two scenarios that have us stumped.
Any help would be greatly appreciated.
Below are some of the directions we've approached this from, but we just
can't quite get over the hump:
///////////////////////////////////////
HERE'S WHAT WILL WORK FOR A SIMPLE RANGE (For example, 10201015*)
WildCharMatch(form.GLN_ACCT_UNIT,user.getAttribute('AcctUnit'))
///////////////////////////////////////
HERE'S WHERE WE ARE NOW
match(table.ACCT_UNIT,user.getAttribute('AcctUnit'))
A. AcctUnit is a RegularExpression. So, here's what you would do for:
Start: 10251015 End: 10252010
AcctUnit=1025[1-2]01[0-5][0-9][0-9][0-9][0-9][0-9]
*You manually specify the digit in each space
*If static digit, just enter digit
*If digit within a range, specify range within a set of brackets
*Go through this for all digits, up to the full 13 digits
///////////////////////////////////////
HERE'S ALL THE OLD CODE THAT DOESN'T QUITE GET US THERE
ELSE IF
user.isAttributeInRange(form.GLN_ACCT_UNIT,user.getAttribute('AcctUnit'))
all access
FORM
if((WildCharMatch(form.GLN_ACCT_UNIT,user.getAttribute('AcctUnit'))))
'ALL_ACCESS,'
else
if(user.isAttributeInRange(form.GLN_ACCT_UNIT,user.getAttribute('AcctUnit')))
'ALL_ACCESS,'
else
'NO_ACCESS,'
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
TIA,
~Shane