Hiding Tabs in Views

A place for users and developers of the Xataface to discuss and receive support.

Hiding Tabs in Views

Postby andperry » Tue Mar 10, 2009 7:10 am

I am using a number of mySQL views in addition to the actual tables. Within these views I would like to disable some of the standard buttons such as 'Delete' and 'New Record'. I'm not sure whether permissions is quite the right approach as I am not actually trying restrict privileges to users.

It is simply a case that some functions don't make sense in the given context. For example there is a view that displays the data from two tables using an inner join. Anyone with access to the database should be able to insert and delete records within the two tables individually, but together not via the combined view.

What is the easiest way of approaching this problem?

Thanks,

Andrew.
andperry
 
Posts: 57
Joined: Wed Feb 18, 2009 9:20 am
Location: Wirral, UK

Postby shannah » Wed Mar 11, 2009 8:42 am

Permissions are probably the best way to handle this.

Code: Select all
function getRoles(&$record){
    return 'READ ONLY';
}
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby andperry » Wed Mar 11, 2009 1:41 pm

Hi Steve,

Many thanks. Defined a new custom role in permissions.ini and it all works fine.

Thanks,

Andrew.
andperry
 
Posts: 57
Joined: Wed Feb 18, 2009 9:20 am
Location: Wirral, UK


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 17 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved