Hi,
When i am working on an exercise. I am quite confusing about
principalperm1.Union and principalperm1.IsSubSetOf method.
Using Union seems joining two user role together and cannot check if they
are in the same security class. while the isSubSet method, as at my
understanding, is to validate whether a security role is under the other
security role.
I cannot make the judgement on that, can anyone tell me how to solve this
question?
With many thanks
Regards,
Norton
You use Visual Studio .NET to develop Windows-based application. You
implement security by using the security classes of the .NET Framework. Your
application includes the follwing procedure.
01 Public Sub ApproveVaction(Byval user1 as string, byval role1 as string, _
02 byval user2 as string, byval role2 as string)
03 dim principalperm1 as new principalpermission(user1, role1)
04 dim principalperm2 as new principalpermission(user2, role2)
05 'Insert new code.
06 'Additional procedure code goes here
07 End Sub
You must ensure that both User1 and User2 are members of the same security
roles. Which code segement should you insert on line 5?
A. principalperm1.IsUnrestricted
principalperm2.IsUnrestricted
B. principalperm1.IsSubSetOf(principalperm2)
C. principalperm1.Intersect(principalperm2).Demand()
D. principalperm1.Union(principalper2).Demand()
|