Solved Permisisons

Discussion in 'Plugin Development' started by thomasb454, Jul 23, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    thomasb454

    Hello,

    I've got a question about permissions. How would I go about adding support for the '*'. I was thinking about getting all of the user's permissions and appending .* to the end.
    But, I don't know. Any ideas?

    Much appreciated <3 Tom.
     
  2. Offline

    _Filip

    I am pretty sure that the permissions plugins handle the wildcard.
     
  3. Offline

    DannyDog

  4. Offline

    thomasb454

    Yes I know they do @TheSpherret. However, I don't know how to do it?
     
  5. Offline

    _Filip

    thomasb454 I just told you that you don't have to do that, the permissions plugins handle it for you.
     
  6. Offline

    thomasb454


    I'm creating the permission plugin.
     
  7. Offline

    _Filip

  8. Offline

    thomasb454


    No need to get so mad, sorry for forgetting to add a piece of information.
     
  9. Offline

    AoH_Ruthless

  10. Offline

    Dragonphase

    thomasb454

    Let's say I have these permission nodes:
    Code:
    'my.permission.node.one'
    'my.permission.node.two'
    'my.permission.node.three'
    And I want to check if someone has each of these permission nodes by using the '*' wildcard:

    Code:
    'my.permission.node.*'
    Simply iterate through all permission nodes that begin with:

    Code:
    'my.permission.node.'
     
  11. Offline

    thomasb454


    I appreciate it.

    You always try to instigate an argument, although I appreciated the link.
     
  12. Offline

    Necrodoom

    TheSpherret DannyDog thomasb454
    What you said about * nodes is not true.
    The '*' node is something only supported by 2 plugins, PermissionsEx and GroupManager, PEX does some reflection hackery which you should not ever replicate, and GM gets all known permissions and gives them, including default: false node, making it a node you should not just give away without consideration.

    plugin.* is defined by the plugin it self, not by the permission plugin (Technically PEX does, but you shouldnt do it if you plan to write a good permission plugin) and is by any means a regular node.

    You should let the plugins handle it and not define your own * nodes.
     
  13. Offline

    AoH_Ruthless

    thomasb454
    I wasn't attempting to spark an argument, my bad for coming across that way.
     
  14. Offline

    _Filip

    Necrodoom I was referring to PEX in my argument, as it is the plugin that I use, and assume most other servers use as well.
     
  15. Offline

    Dragonphase

    Brace for reasons not to use PEX.
     
  16. Offline

    DannyDog

    *reads comment>looks at dp*
     
  17. Offline

    thomasb454


    Thanks, I appreciated this information.
     
Thread Status:
Not open for further replies.

Share This Page