The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Cpanel plugin visible only to some users depend of ownership.

Discussion in 'cPanel Developers' started by gemby, Dec 29, 2011.

  1. gemby

    gemby Well-Known Member
    PartnerNOC

    Joined:
    Feb 16, 2002
    Messages:
    182
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Pula, Croatia
    cPanel Access Level:
    DataCenter Provider
    I am trying to make some cpanel plugin, that must be visbile to users regarding of ownership. Meaning, i would like to plugin to bi visible to users whom is root owner, but not visible to users whom is reseller owner. When i look in auto generated yaml file of newly created plugin, there if statment IF: empty one, but could not figure out how to use it.

    Plugin is ready, but i is visible to all users.

    Yes, i know that feature list is maybe good way to go, but not as automatic as i would like to.

    Any ideas?
     
    #1 gemby, Dec 29, 2011
    Last edited: Dec 29, 2011
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Let me see if I understand what you are looking for.

    You want your plugin to be visible if the person has root-level access to WHM, but invisible to everyone else?

    If that is the case, here is a useful article that will show you the basics on how to do this:

    WHM Plugins - cPanel Integration

    The ACL you would check for to detect if they have root-level access is the ACL called 'all'
     
  3. gemby

    gemby Well-Known Member
    PartnerNOC

    Joined:
    Feb 16, 2002
    Messages:
    182
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Pula, Croatia
    cPanel Access Level:
    DataCenter Provider
    Tnx David, but not not quite like that. This is whm related, but i would like to show, or not show cpanel icon, and plugin behind it, regarding to whom this cpanel account belongs. Eg, that accounts under ownership of one reseller sees plugin, but other do not. In users cpanel, not in whm.
     
  4. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    If you make your cPanel plugin visible in the feature list, it can be toggled on a per-package basis. If you limit reseller accounts to specific packages, and those packages have a feature list that does not contain that feature (or does contain that feature) you can effectively limit the feature to just cPanel accounts owned by specific resellers.
     
  5. gemby

    gemby Well-Known Member
    PartnerNOC

    Joined:
    Feb 16, 2002
    Messages:
    182
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Pula, Croatia
    cPanel Access Level:
    DataCenter Provider
    Yes, this will probably solve it, but problem is that we allowed resellers to use our packages too, and this "owner" thing is also usable for other things, reporting some things to our users, resellers, but not to their clients, depending who owns package? So, is it possible to extract owner of package?
     
  6. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    The owner of the package is not necessarily the owner of the account. For example, if Reseller1 owns User1, but the package rootPkg was created by root and delegated to Reseller1, then even if this package is assigned to User1, the package being used by User1 would be owned by root, not Reseller1.

    I believe it would be better (by means of being far less troublesome) to work on the basis of who owns which accounts when it comes to data reporting. The ownership of an account can be determined via the XML API in a few ways, but using the account summary functionality seems to be the best fit: ShowAccountInformation < SoftwareDevelopmentKit < TWiki
     
  7. gemby

    gemby Well-Known Member
    PartnerNOC

    Joined:
    Feb 16, 2002
    Messages:
    182
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Pula, Croatia
    cPanel Access Level:
    DataCenter Provider
    Yes, that's what i am looking for, tnx m8 ;-)
     
Loading...

Share This Page