PermissionsPermissionshttps://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785333&threadId=1204988582024-03-29T10:30:21Z2024-03-29T10:30:21ZRE: PermissionsMohammed Yasinhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1205061482020-12-16T06:15:46Z2020-12-16T06:15:46Z<p>When you define action with respected permision then you can check
using PermissionChecker Object whether the current user has requested
action permission </p>
<p>Ex.</p>
<pre><code class="language-java">PermissionChecker permissionChecker = PermissionThreadLocal.getPermissionChecker();
permissionChecker.hasPermission(groupId, className, classPK, ActionKeys.ADD_ENTRY)
</code></pre>
<p>
<br /> As in above example it will check whether the user is having
permission to add entry for given className and classPK </p>Mohammed Yasin2020-12-16T06:15:46ZRE: PermissionsMohammed Yasinhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1205061362020-12-16T06:15:28Z2020-12-16T06:15:28Z<p>Hi ,</p>
<p>You can make use of Liferay's Application Permission system for this
, You can define 5 role and assign respected actions
(ADD_ENTRY,DELETE,UPDATE,VIEW etc) for each role , </p>
<p>Refer below links for implementation .</p>
<p>
<a href="https://help.liferay.com/hc/en-us/articles/360017887012-Defining-Application-Permissions">https://help.liferay.com/hc/en-us/articles/360017887012-Defining-Application-Permissions</a></p>
<p>
<a href="https://help.liferay.com/hc/en-us/articles/360018166171-Defining-Resources-and-Permissions">https://help.liferay.com/hc/en-us/articles/360018166171-Defining-Resources-and-Permissions</a></p>
<p>
<a href="https://help.liferay.com/hc/en-us/articles/360017887032-Registering-Permissions">https://help.liferay.com/hc/en-us/articles/360017887032-Registering-Permissions</a></p>
<p>
<a href="https://help.liferay.com/hc/en-us/articles/360018166191-Associating-Permissions-with-Resources">https://help.liferay.com/hc/en-us/articles/360018166191-Associating-Permissions-with-Resources</a></p>
<p>
<a href="https://help.liferay.com/hc/en-us/articles/360018166211-Checking-Permissions">https://help.liferay.com/hc/en-us/articles/360018166211-Checking-Permissions</a></p>
<p>
<a href="https://help.liferay.com/hc/en-us/articles/360018166191-Associating-Permissions-with-Resources">https://help.liferay.com/hc/en-us/articles/360018166191-Associating-Permissions-with-Resources</a></p>Mohammed Yasin2020-12-16T06:15:28ZRE: RE: PermissionsSyed Arifhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1205034792020-12-16T06:06:48Z2020-12-14T08:26:26Z<p>Like iam not gettuing exact how if user one login means add entry
should come</p>Syed Arif2020-12-14T08:26:26ZPermissionsSyed Arifhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1204988572020-12-10T06:04:35Z2020-12-10T06:04:35Z<p>Hi I have created one crud application and i want to give permissions
for that like i have created 5 users and 5 roles and i have assigned
roles to that 5 users and i want to implement in the code like if
user1 login means where he can Add and view ,user2 logins means where
he can update ,user3 logins means where he can delete ,