Subject: [tryton] Re: How to customize security

From: Cédric Krier <[email-masked]>
Date: Fri, 5 Dec 2008 11:22:35 +0100

On 04/12/08 21:32 -0800, Sanjay wrote:
> 
> Hi All,
> 
> Say I have some scenario like this:
> 
> - Have an "employee" table with a related "user_id" field.
> - Any employee in an organization can login and create a record in
> "resource" table. ("resource" table has a field
> "created_by_employee_id")
> - The employee who has created the record can only edit the record.
> - All employees should be able to read all "resource" records.
> - All employees should be able to select a "resource" record in combo
> boxes in some other forms.
> 
> Need help on how to proceed with security setup for this.
> 

I think the simplest way to do this is by overriding write and delete
method on the model "resource" and make the check about the ids and the
user.

-- 
Cédric Krier

B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email: [email-masked]
Jabber: [email-masked]
Website: http://www.b2ck.com/

---

From: Sanjay <[email-masked]>
Date: Thu, 4 Dec 2008 21:32:46 -0800 (PST)

Hi All,

thanks,
Sanjay

--~--~---------~--~----~------------~-------~--~----~
[email-masked] mailing list
-~----------~----~----~----~------~----~------~--~---