How can i restrict the users for not showing other users records(User has to see his records only)
how can i use after_retreive event for this
Pls help me pls pls
How can i restrict the users for not showing other users records(User has to see his records only)
how can i use after_retreive event for this
Pls help me pls pls
You can create an after_retrieve logic hook with code like this:
You can find more info on using the logic hooks in the DEV manual herePHP Code:global $current_user;
if (is_admin($current_user)) return; // Always allow admin
if ($current_user->id != $bean->assigned_user_id)
$bean->id = NULL; // Shows can not retrieve ...
http://developers.sugarcrm.com/docs/...e_5.1-toc.html
--
Marnus van Niekerk
There are only 10 types of people in the world
those who can read binary and those who don't
Modules:
CE Teams - Upgrade safe teams module for Community Edition
FieldACL - Field Level Access Control for Community Edition
EditLogicHooks - Create and edit Logic Hooks from the Admin GUI
FlexibleChartDashlet - Display any data in a Dashlet Chart
DocumentThumbnails - Thumbnails for Documents module
Many questions can be answered by reading the Developers Manual
Thank u for ur Reply
Regards
Vijayabhaskar reddy
The best solution is to create the controller for the custom module and define the methods action_detailview and action_editview.
PHP Code:global $current_user;
if(! is_admin($current_user) && $current_user->id != $bean->assigned_user_id) {
$this->view = 'noaccess';
}
André Lopes
DevToolKit / Project of the Month - June 2009
Lampada Global Services- Open Source Solutions
Avenida Ipiranga, 318
Bloco B - CJ 1602
São Paulo, SP 01046-010
Brazil
Office: +55 11 3237-3110
Mobile: +55 11 7636-5859
e-mail: andre@lampadaglobal.com
Lampada Global delivers offshore software development and support services to customers around the world.
Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.
I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks