I have one form but contains many datablocks,

Some users have full access to all datablocks and canvases and some users have access to some blocks and canvases (not all blocks)
Also, some users can edit data and some can view only.

I want to control users and the blocks,items,canvases that they have access to.

In this case, where should i put my "security" code?

Stecal, is it possible to give me a sample code that i can start from???

Thanks a lot.