Questions about the Security Permission

Discussion in 'MCAD' started by norton, Nov 10, 2004.

  1. norton

    norton Guest

    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()
    norton, Nov 10, 2004
    #1
    1. Advertising

  2. norton

    Wei Guest

    Use Intersect to check if they are in the same security
    class.

    >-----Original Message-----
    >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()
    >
    >
    >.
    >
    Wei, Nov 10, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Daniel

    WinXP Pro: Sharing permission questions

    Daniel, Mar 8, 2005, in forum: Computer Support
    Replies:
    5
    Views:
    809
    Daniel
    Mar 11, 2005
  2. da35333

    xp security permission problem

    da35333, Nov 13, 2006, in forum: Computer Support
    Replies:
    1
    Views:
    535
    globalchicken
    Nov 14, 2006
  3. Skybuck Flying
    Replies:
    1
    Views:
    51,867
    itexperience
    Jun 29, 2009
  4. Kue2
    Replies:
    5
    Views:
    22,643
    =?Utf-8?B?UGV0cm9sSGVhZA==?=
    Nov 12, 2007
  5. Patrick Michael

    Re: Questions....questions....questions

    Patrick Michael, Jun 16, 2004, in forum: A+ Certification
    Replies:
    0
    Views:
    812
    Patrick Michael
    Jun 16, 2004
Loading...

Share This Page