<?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[User permissions to view pages]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I have a customer requirement to limit certain users access to view certain pages only.</p>
<p dir="auto">I've used the admin template to build my dashboards.</p>
<p dir="auto">I'd like to be able to restrict/grant user access either by group or individual user.</p>
<p dir="auto">Is there a code example I can use for this? or something existing that does this I can make use of?</p>
<p dir="auto">Cheers!<br />
-Shaun</p>
]]></description><link>https://forum.mango-os.com/topic/2635/user-permissions-to-view-pages</link><generator>RSS for Node</generator><lastBuildDate>Mon, 09 Mar 2026 08:32:14 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/2635.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 20 Jan 2017 02:32:52 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to User permissions to view pages on Tue, 31 Jan 2017 02:23:00 GMT]]></title><description><![CDATA[<p dir="auto">Thanks guys!</p>
<p dir="auto">As always, appreciate your help!</p>
<p dir="auto">Cheers!</p>
]]></description><link>https://forum.mango-os.com/post/13756</link><guid isPermaLink="true">https://forum.mango-os.com/post/13756</guid><dc:creator><![CDATA[shaun]]></dc:creator><pubDate>Tue, 31 Jan 2017 02:23:00 GMT</pubDate></item><item><title><![CDATA[Reply to User permissions to view pages on Fri, 20 Jan 2017 18:21:31 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/shaun">@<bdi>shaun</bdi></a><br />
Phillip's post contains a lot of useful information. As he has indicated the best way to restrict users from seeing data they should not be seeing is to set the permissions on the data points and on the JSON store objects.</p>
<p dir="auto">However it is also very useful to hide certain navigation links inside your app so your users can't navigate to a page that they will not be able to access any data on. This can be done for menu items by adding a <code>permission</code> property to an object in the <code>MENU_ITEMS</code> array. If you need to hide something in the content of your page you can add a <code>ng-show</code> or <code>ng-if</code> directive, e.g. <code>ng-show="user.hasPermission('superadmin')"</code></p>
]]></description><link>https://forum.mango-os.com/post/13714</link><guid isPermaLink="true">https://forum.mango-os.com/post/13714</guid><dc:creator><![CDATA[Jared Wiltshire]]></dc:creator><pubDate>Fri, 20 Jan 2017 18:21:31 GMT</pubDate></item><item><title><![CDATA[Reply to User permissions to view pages on Fri, 20 Jan 2017 06:08:52 GMT]]></title><description><![CDATA[<p dir="auto">Hi Shaun,</p>
<p dir="auto">Others may have more to contribute tomorrow, but,</p>
<p dir="auto">You can use data point permissions to restrict access to points, such that those points wouldn't show up for other users and they won't be able to query for values. Our permissions system is a comma delimited set of string tags on data points and users, so that does enable having permissions individually for a user. A user without privileges that found the URL of another dashboard would encounter empty lists and empty charts. These field to enter these permissions is on the edit page for the thing, and there is a bulk permissions tool on the /users.shtm page for admins.</p>
<p dir="auto">There is not a way to create an arbitrary set of user restrictions for URLs without writing a module.</p>
<p dir="auto">However, if it is important to restrict access to the markup, you can do this by confining the markup into the JSON Store, and use the &lt;ma-json-store&gt; directive to load this. It is documented on <code>/dashboards/examples/utilities/json-store</code></p>
<p dir="auto">Try adding some HTML or angular directives into the 'phone' field on that page, saving it, then loading this in your play area:</p>
<pre><code>&lt;ma-json-store xid="test" item="myItem" value="myValue"&gt;&lt;/ma-json-store&gt;

&lt;div layout="row"&gt;
    &lt;div flex="100"&gt;
        &lt;div live-preview="myValue.phone"&gt;&lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
</code></pre>
<p dir="auto">Note on the JSON store page that there is an edit and read permission, and this Mango will enforce with that same tagging as elsewhere. Then you can either have separate URLs that load the content of the page by hardcoding the xid in the ma-json-store tag or you can have all users load the same page and modify the xid of the element by user to load their page.</p>
]]></description><link>https://forum.mango-os.com/post/13713</link><guid isPermaLink="true">https://forum.mango-os.com/post/13713</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Fri, 20 Jan 2017 06:08:52 GMT</pubDate></item></channel></rss>