Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

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.

LiveAPI trick so feature is enabled

Discussion in 'cPanel Developers' started by sparek-3, Jul 11, 2017.

  1. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,457
    Likes Received:
    35
    Trophy Points:
    178
    cPanel Access Level:
    Root Administrator
    Is there a way to trick the UAPI into believing that a certain feature is enabled for a user, so that access to those UAPI modules can be used?

    For example, it's not possible to use the UAPI SSL modules unless the user specifically has the sslinstall feature enabled. If I want to create a custom page in the user's cPanel to check for SSL, I can't do that unless the user specifically is on a package that has a feature list that has the sslinstall feature enabled.
     
  2. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,515
    Likes Received:
    33
    Trophy Points:
    308
    cPanel Access Level:
    Root Administrator
    Correct. You cannot use API calls to bypass the user's permissions (which is what features are). What is it you are trying to do with the SSL API calls? There might be another way to solve your problem.
     
  3. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,457
    Likes Received:
    35
    Trophy Points:
    178
    cPanel Access Level:
    Root Administrator
    Well, I'm really just playing with some stuff and seeing what all I can do.

    The main issue comes down to features having to be enabled in a feature list then in a package then applied to a user.

    For example, sslinstall is not really a feature I want to be enabled for every user. And if I have 20 packages, then I'll have to create 20 more packages that use a feature list that has sslinstall enabled. Now imagine doing that for other features, like maybe mailman. I'll have to create another 20 packages that use a feature list with mailman enabled AND another 20 packages that has mailman and sslinstall (because there may be clients that I want to have sslinstall and mailman enabled for). This grows exponentially very quickly.

    It might be beneficial to be able to select features on a per user level.

    Better yet, two sets of options enabling a feature per user (that would just have UAPI access) AND enabling feature per user and showing those features in the user's cPanel. This way I could enable sslinstall for a user, have access to sslinstall UAPI modules, but not necessarily show the SSL Manager and what not in the user's cPanel.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,418
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hi @sparek-3,

    The following feature request is open to request the ability to enable features on a per-account basis:

    Enable Feature via username instead of via package

    I encourage you to open a separate feature request if you'd like to see it implemented in a different way, or add a comment to the above feature request with your input on how such a feature should work.

    Thank you.
     
  5. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,457
    Likes Received:
    35
    Trophy Points:
    178
    cPanel Access Level:
    Root Administrator
    Not to really get into a war of words about the feature request, but that request is over 2 years old. I started it 2 years ago. It hasn't gotten any traction. Granted, I am biased, I think it's a great idea. But in two years, it's seen nothing as far as being implemented. Why should I believe that that will change now?

    For what it's worth, I'll come up with another way to accomplish what I want to accomplish. I'll have to go outside of the cPanel API. You can mark this thread as solved or close it.
     
Loading...

Share This Page