'Check permissions for component tabs (in order to deactivate
tabs the user is not permitted to access)
@param hook: the component hook'

def authorised(self, hook):

    READ = 'read'
    has_permission = current.auth.s3_has_permission
    if (hook.linktable and (not has_permission(READ, hook.linktable))):
        return False
    if has_permission(READ, hook.tablename):
        return True
    return False
