void clicked()
{
DIPL_UserSecurity userSecurity;
SecurityTask tsecurityTask,task;
SecuritySubTask securitySubTask,sub;
SecurityRole tsecurityRole;
SecurityTaskEntryPoint SecurityTaskEntryPoint;
SecurableObject SecurableObject;
SecurityUserRole securityUserRole;
SecurityRole role;
SecurityRoleTaskGrant taskGrant;
SecuritySubTask subTask;
int i;
str 50 value;
str 100 dutyName;
int64 myId;
container con;
con = selectuser.getSelectedFieldValues();
super();
delete_from userSecurity;
if(Usmf_user.valueStr() != "")
{
for (i = 1; i <= conLen(con); i++)
{
value = conPeek(con,i);
while select * from tsecurityRole
join user from securityUserRole
where securityUserRole.User == value
&& securityUserRole.SecurityRole == tsecurityRole.RecId
{
select * from SecurityTaskEntryPoint
join RecId from SecurableObject
where SecurableObject.RecId == SecurityTaskEntryPoint.EntryPoint
join SecuritySubTask from subTask
where subTask.SecuritySubTask == SecurityTaskEntryPoint.SecurityTask
join SecurityTask from taskGrant
where taskGrant.SecurityTask == subTask.SecurityTask
join RecId, AotName, name from role
where role.RecId == taskGrant.SecurityRole
&& role.Name like tsecurityRole.Name;
if((tsecurityTask.Type == SecurityTaskType::Duty) || (tsecurityTask.Type == SecurityTaskType::Privilege))
{
select * from tsecurityTask
where tsecurityTask.RecId == taskGrant.SecurityTask
&& SecurityTaskType::Duty == tsecurityTask.Type;
dutyName = tsecurityTask.AotName;
myId = tsecurityTask.RecId;
while select * from tsecurityTask
join securitySubTask where tsecurityTask.RecId == securitySubTask.SecurityTask
&& tsecurityTask.RecId == myId
{
select * from task
join * from sub where task.RecId == sub.SecuritySubTask
&& task.RecId == securitySubTask.SecuritySubTask;
userSecurity.UserId = value;
userSecurity.Role = tsecurityRole.Name;
userSecurity.Duty = dutyName;
userSecurity.Privilege = task.AotName;
userSecurity.insert();
}
}
userSecurity.UserId = value;
userSecurity.Role = tsecurityRole.Name;
userSecurity.Duty = dutyName;
userSecurity.Privilege = task.AotName;
userSecurity.insert();
DIPL_UserSecurity_ds.research();
}
}
}
else
{
if(Usmf_user.valueStr() == "")
{
while select * from tsecurityRole
join user from securityUserRole
where securityUserRole.User == securityUserRole.User//value
&& securityUserRole.SecurityRole == tsecurityRole.RecId
{
select * from SecurityTaskEntryPoint
join RecId from SecurableObject
where SecurableObject.RecId == SecurityTaskEntryPoint.EntryPoint
join SecuritySubTask from subTask
where subTask.SecuritySubTask == SecurityTaskEntryPoint.SecurityTask
join SecurityTask from taskGrant
where taskGrant.SecurityTask == subTask.SecurityTask
join RecId, AotName, name from role
where role.RecId == taskGrant.SecurityRole
&& role.Name like tsecurityRole.Name;
if((tsecurityTask.Type == SecurityTaskType::Duty) || (tsecurityTask.Type == SecurityTaskType::Privilege))
{
select * from tsecurityTask
where tsecurityTask.RecId == taskGrant.SecurityTask
&& SecurityTaskType::Duty == tsecurityTask.Type;
dutyName = tsecurityTask.AotName;
myId = tsecurityTask.RecId;
while select * from tsecurityTask
join securitySubTask where tsecurityTask.RecId == securitySubTask.SecurityTask
&& tsecurityTask.RecId == myId
{
select * from task
join * from sub where task.RecId == sub.SecuritySubTask
&& task.RecId == securitySubTask.SecuritySubTask;
userSecurity.UserId = securityUserRole.User;
userSecurity.Role = tsecurityRole.Name;
userSecurity.Duty = dutyName;
userSecurity.Privilege = task.AotName;
userSecurity.insert();
}
}
userSecurity.UserId = securityUserRole.User;
userSecurity.Role = tsecurityRole.Name;
userSecurity.Duty = dutyName;
userSecurity.Privilege = task.AotName;
userSecurity.insert();
DIPL_UserSecurity_ds.research();
}
}
}
}
{
DIPL_UserSecurity userSecurity;
SecurityTask tsecurityTask,task;
SecuritySubTask securitySubTask,sub;
SecurityRole tsecurityRole;
SecurityTaskEntryPoint SecurityTaskEntryPoint;
SecurableObject SecurableObject;
SecurityUserRole securityUserRole;
SecurityRole role;
SecurityRoleTaskGrant taskGrant;
SecuritySubTask subTask;
int i;
str 50 value;
str 100 dutyName;
int64 myId;
container con;
con = selectuser.getSelectedFieldValues();
super();
delete_from userSecurity;
if(Usmf_user.valueStr() != "")
{
for (i = 1; i <= conLen(con); i++)
{
value = conPeek(con,i);
while select * from tsecurityRole
join user from securityUserRole
where securityUserRole.User == value
&& securityUserRole.SecurityRole == tsecurityRole.RecId
{
select * from SecurityTaskEntryPoint
join RecId from SecurableObject
where SecurableObject.RecId == SecurityTaskEntryPoint.EntryPoint
join SecuritySubTask from subTask
where subTask.SecuritySubTask == SecurityTaskEntryPoint.SecurityTask
join SecurityTask from taskGrant
where taskGrant.SecurityTask == subTask.SecurityTask
join RecId, AotName, name from role
where role.RecId == taskGrant.SecurityRole
&& role.Name like tsecurityRole.Name;
if((tsecurityTask.Type == SecurityTaskType::Duty) || (tsecurityTask.Type == SecurityTaskType::Privilege))
{
select * from tsecurityTask
where tsecurityTask.RecId == taskGrant.SecurityTask
&& SecurityTaskType::Duty == tsecurityTask.Type;
dutyName = tsecurityTask.AotName;
myId = tsecurityTask.RecId;
while select * from tsecurityTask
join securitySubTask where tsecurityTask.RecId == securitySubTask.SecurityTask
&& tsecurityTask.RecId == myId
{
select * from task
join * from sub where task.RecId == sub.SecuritySubTask
&& task.RecId == securitySubTask.SecuritySubTask;
userSecurity.UserId = value;
userSecurity.Role = tsecurityRole.Name;
userSecurity.Duty = dutyName;
userSecurity.Privilege = task.AotName;
userSecurity.insert();
}
}
userSecurity.UserId = value;
userSecurity.Role = tsecurityRole.Name;
userSecurity.Duty = dutyName;
userSecurity.Privilege = task.AotName;
userSecurity.insert();
DIPL_UserSecurity_ds.research();
}
}
}
else
{
if(Usmf_user.valueStr() == "")
{
while select * from tsecurityRole
join user from securityUserRole
where securityUserRole.User == securityUserRole.User//value
&& securityUserRole.SecurityRole == tsecurityRole.RecId
{
select * from SecurityTaskEntryPoint
join RecId from SecurableObject
where SecurableObject.RecId == SecurityTaskEntryPoint.EntryPoint
join SecuritySubTask from subTask
where subTask.SecuritySubTask == SecurityTaskEntryPoint.SecurityTask
join SecurityTask from taskGrant
where taskGrant.SecurityTask == subTask.SecurityTask
join RecId, AotName, name from role
where role.RecId == taskGrant.SecurityRole
&& role.Name like tsecurityRole.Name;
if((tsecurityTask.Type == SecurityTaskType::Duty) || (tsecurityTask.Type == SecurityTaskType::Privilege))
{
select * from tsecurityTask
where tsecurityTask.RecId == taskGrant.SecurityTask
&& SecurityTaskType::Duty == tsecurityTask.Type;
dutyName = tsecurityTask.AotName;
myId = tsecurityTask.RecId;
while select * from tsecurityTask
join securitySubTask where tsecurityTask.RecId == securitySubTask.SecurityTask
&& tsecurityTask.RecId == myId
{
select * from task
join * from sub where task.RecId == sub.SecuritySubTask
&& task.RecId == securitySubTask.SecuritySubTask;
userSecurity.UserId = securityUserRole.User;
userSecurity.Role = tsecurityRole.Name;
userSecurity.Duty = dutyName;
userSecurity.Privilege = task.AotName;
userSecurity.insert();
}
}
userSecurity.UserId = securityUserRole.User;
userSecurity.Role = tsecurityRole.Name;
userSecurity.Duty = dutyName;
userSecurity.Privilege = task.AotName;
userSecurity.insert();
DIPL_UserSecurity_ds.research();
}
}
}
}
No comments:
Post a Comment