|
It looks like you hit the nail on the head. I just checked
my DMPOLICYGROUP table in Oracle and it does indeed use 1-6 for the default
PolicyGroupIDs. I'm relatively new to Oracle so I'm not sure, would
we need to manually adjust the DMPOLICYGROUP_SEQ table with this
approach?
Thanks,
--Nathan
I've been working on the PostgreSQL code and I've recently noticed
some weirdness with permissions as well. I've noticed a little discrepancy in
the dmPolicyGroup table between MySQL and PostgreSQL installs:
This is
from MySQL:
PolicyGroupId
PolicyGroupName
1
SysAdmin
2
SiteAdmin
3
Member
5
Contributors
6
Publishers
7
Anonymous
and from
PostgreSQL:
policygroupid
policygroupname
1
SysAdmin
2
SiteAdmin
3
Member
4
Contributors
5
Publishers
6
Anonymous
notice how in MySQL there is no id of 4? That little shift
messes (at least) with the policy group mappings, which I believe in the
installer maps using the ids.
I've traced it down to the
farcry_core/packages/security/authorization.cfc file where you can create a
policy group (createPolicyGroup). Both Oracle and PostgreSQL use sequences for
their auto incrementing columns. The code for both Oracle and PostgreSQL would
always use the next sequence number even if a policyGroupId was passed to the
method. The result is the 1-6 that you see without the missing 4. In the
farcry_core/admin/install/dmSec_files/policyGroups.wddx, which this data is
based on, you'll notice the missing 4.
Here is the new code for Oracle
and PostgreSQL for the authorization.cfc file starting at line 318. Please
note I don't have access to Oracle so I can't verify if it works. You could
either reinstall or just update the policyGroupId values in the table.
case "ora":
{
sql = "
INSERT INTO #application.dbowner##stPolicyStore.PolicyGroupTable# (policyGroupName,policyGroupNotes,policyGroupID)
VALUES
('#arguments.PolicyGroupName#' ,'#arguments.PolicyGroupNotes#'";
if (isDefined("arguments.policyGroupId")) {
sql = sql & ",#arguments.policyGroupId#";
} else {
sql = sql & ",DMPOLICYGROUP_SEQ.nextval";
}
sql = sql & ")";;
break;
}
case "postgresql":
{
sql = "
INSERT INTO #application.dbowner##stPolicyStore.PolicyGroupTable# ( policyGroupName,policyGroupNotes ";
if (isDefined("arguments.policyGroupId"))
sql = sql & ",policyGroupId";
sql = sql & ")
VALUES
('#arguments.PolicyGroupName#' ,'#arguments.PolicyGroupNotes#'";
if (isDefined("arguments.policyGroupId"))
sql = sql & ",#arguments.policyGroupId#";
sql = sql & ")";
break;
}
--Kyle
---
You are currently subscribed to farcry-dev as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/
|