<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[[solved] How can I use the user management&#x2F;right management in packages]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">I’ve written a  add-on for squidGuard.  It needs squidGuard3 and works well on the first test. But I need a user management. How can I use the included user management. I have created a user, the user should only be able to use the new add-on. I see two opportunities:</p>
<ol>
<li>Put the new side in the “System: Group manager: Add privileges”-list (however?!?)</li>
<li>Check in the new side the group of the current user (however?!?)<br />
I think the first is more nicely but the second is easier. But I have no idea to realize it.</li>
</ol>
<p dir="auto">So my questions are:</p>
<p dir="auto">1. how can I add a self created side to the “System: Group manager: Add privileges”-list<br />
or:<br />
2a. how can I get the username in a php-script<br />
2b. how can I get the groups of a user.</p>
<p dir="auto">Thank you</p>
<p dir="auto">Snowyrain</p>
<p dir="auto">I found it:</p>
<p dir="auto">I take a look in the package file "/usr/local/pkg/squidguard.xml". In this file ist the internal name of the package "&lt;name&gt;squidguardgeneral&lt;/name&gt;"</p>
<p dir="auto">Then I creat a file “/etc/inc/priv/squidguardgeneral.priv.inc” with:</p>
<p dir="auto">global $priv_list;<br />
$priv_list['page-squidguardgeneral'] = array();<br />
$priv_list['page-squidguardgeneral']['name']  = gettext("WebCfg - Services: squidGuard");<br />
$priv_list['page-squidguardgeneral']['descr'] = "Indicates whether the user is able to login on squidguard.";<br />
$priv_list['page-squidguardgeneral']['match'] = array();<br />
$priv_list['page-squidguardgeneral']['match'][] = "squidGuard/squidguard_addon.php*";</p>
<p dir="auto">?&gt;</p>
<p dir="auto">Now I can see a new line in the privileges-list and give this privilege to a user. And it works.</p>
]]></description><link>https://forum.netgate.com/topic/69367/solved-how-can-i-use-the-user-management-right-management-in-packages</link><generator>RSS for Node</generator><lastBuildDate>Wed, 11 Mar 2026 18:42:57 GMT</lastBuildDate><atom:link href="https://forum.netgate.com/topic/69367.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 19 May 2014 17:36:48 GMT</pubDate><ttl>60</ttl></channel></rss>