site_with_backoffice

How to build a site with an optional login form

To publish a public site with data without any need to login to access, here is the code :

function getPermissions(&$record){
    if ( isAdmin() ) return Dataface_PermissionsTool::ALL();
    else return Dataface_PermissionsTool::READ_ONLY();
}

In this way, you still can login to administrate your data. var disqus_identifier = ‘xataface.com/wiki/site_with_backoffice’; (function() { var dsq = document.createElement(‘script’); dsq.type = ‘text/javascript’; dsq.async = true; dsq.src = ‘http://xataface.disqus.com/embed.js’; (document.getElementsByTagName(‘head’)[0] || document.getElementsByTagName(‘body’)[0]).appendChild(dsq); })(); blog comments powered by Disqus

//<![CDATA[ (function() { var links = document.getElementsByTagName(‘a’); var query = ‘?’; for(var i = 0; i < links.length; i++) { if(links[i].href.indexOf(‘#disqus_thread’) >= 0) { query += ‘url’ + i + ‘=’ + encodeURIComponent(links[i].href) + ‘&’; } } document.write(‘