about permissions

Discussion in 'MCAD' started by Rob, Aug 2, 2004.

  1. Rob

    Rob Guest

    hi,
    i have two questions about permissions , hope someone can
    help:

    1- generic principal vs impersonate
    2- linkDemand vs Assert

    1- if I impersonate an administrator on a computer, or i
    created a generic principal with the role of
    administrator, wouldn't that be the same ?

    2-
    Assert method: Declares that the calling code can access
    the resource protected by a permission demand through the
    code that calls this method, even if callers higher in
    the stack have not been granted permission to access the
    resource.

    LinkDemand method:
    The immediate caller is required to have been granted the
    specified permission.

    in the assert method, the immediate caller can or can't
    access resources even if the immediate caller doesn't
    have the permission ?
    Rob, Aug 2, 2004
    #1
    1. Advertising

  2. Rob

    anonymous Guest

    When you create a principalpermission, the user named must
    be in the the role named.

    dim myPerm as new PrincipalPermission("myUser", "myGroup")
    myPerm.Demand
    '' Demand will fail if the user is "myUser" but is not in
    the group "myGroup"
    I don not believe you can extend permissions through code,
    you can only further restrict the existing permissions.

    Assert vs Demand
    With assert, the immediate caller must have permission to
    access the resources.
    With Demand, every caller on the stack must have access to
    the resources.
    I think if assert fails, demand will always fail.

    Does this sound right to the rest of the group? If it's
    not right, please correct me.
    >-----Original Message-----
    >hi,
    >i have two questions about permissions , hope someone can
    >help:
    >
    >1- generic principal vs impersonate
    >2- linkDemand vs Assert
    >
    >1- if I impersonate an administrator on a computer, or i
    >created a generic principal with the role of
    >administrator, wouldn't that be the same ?
    >
    >2-
    >Assert method: Declares that the calling code can access
    >the resource protected by a permission demand through the
    >code that calls this method, even if callers higher in
    >the stack have not been granted permission to access the
    >resource.
    >
    >LinkDemand method:
    >The immediate caller is required to have been granted the
    >specified permission.
    >
    >in the assert method, the immediate caller can or can't
    >access resources even if the immediate caller doesn't
    >have the permission ?
    >.
    >
    anonymous, Aug 2, 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. HowburyPete

    File shaing - how to set permissions?

    HowburyPete, Jul 5, 2004, in forum: Wireless Networking
    Replies:
    2
    Views:
    1,277
    HowburyPete
    Jul 7, 2004
  2. Dan Orth

    Sharing permissions based on user

    Dan Orth, Jul 14, 2004, in forum: Wireless Networking
    Replies:
    3
    Views:
    3,270
    Simon Pleasants
    Jul 16, 2004
  3. aSussertown

    permissions

    aSussertown, Nov 10, 2004, in forum: Wireless Networking
    Replies:
    0
    Views:
    608
    aSussertown
    Nov 10, 2004
  4. =?Utf-8?B?TWlrZSBMbG95ZA==?=

    XP Pro SP2..Permissions problem I think

    =?Utf-8?B?TWlrZSBMbG95ZA==?=, Jan 5, 2005, in forum: Wireless Networking
    Replies:
    4
    Views:
    3,310
  5. =?Utf-8?B?QW56eQ==?=

    Wireless Network - XP Home - Permissions Issue

    =?Utf-8?B?QW56eQ==?=, Feb 7, 2005, in forum: Wireless Networking
    Replies:
    2
    Views:
    3,427
    =?Utf-8?B?QW56eQ==?=
    Feb 7, 2005
Loading...

Share This Page