Announcement

Collapse
No announcement yet.

API Auth in templates

Collapse
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

    API Auth in templates

    Hi,

    ME ... AGAIN ...

    This time, it's more straight up question (hopefully)

    I have this code in a widget :

    Code:
    {vb:data IPresults, user, searchIP, '1', '2'}
    
    {vb:debugvardump $IPresults}
    
    <hr>
    <table>
    <vb:each from="IPresults.regipusers.1" value="RegIPs">
        <tr>
            <td>{vb:var RegIPs.username}</td>
            <td>{vb:var RegIPs.ipaddress}</td>
        </tr>
    </vb:each>
    </table>
    Of course, ignore the debug, it's just in a dev stage.

    The code works, if I'm logged in as admin, but only if I've confirmed my login (either via going into ACP or opening sitebuilder and confirming my password).

    2 questions :

    - Is this because it concerns this particular API call & data ?
    - Is there a way to give authorization to some other users than admin without giving ACP access ? (Either via code or via an ACP option)

    Thanks !

    #2
    So figured out that if you turn off the "inline moderation" setting in the Admin Control Panel, you get a different message.

    Right now, to be able to see the result of this query, you need to have the "Can administer users" option turned on for the specific user you are looking to give access to this info.

    I was wondering glennrocksvb is there any bypass, or possibility to sort of "set" this permission in a template ?

    Comment

    Users Viewing This Page

    Collapse

    There is 1 user viewing this forum topic.

    • Guest Guest

    Latest Posts

    Collapse

    Working...
    X
    Searching...Please wait.
    An unexpected error was returned: 'Your submission could not be processed because you have logged in since the previous page was loaded.

    Please push the back button and reload the previous window.'
    An unexpected error was returned: 'Your submission could not be processed because the token has expired.

    Please push the back button and reload the previous window.'
    An internal error has occurred and the module cannot be displayed.
    There are no results that meet this criteria.
    Search Result for "|||"