def s3_role_required():
 T = current.T
 gtable = current.auth.settings.table_group
 represent = S3Represent(lookup='auth_group', fields=['role'])
 f = S3ReusableField('role_required', gtable, sortby='role', requires=IS_EMPTY_OR(IS_ONE_OF(current.db, 'auth_group.id', represent, zero=T('Public'))), represent=represent, label=T('Role Required'), comment=DIV(_class='tooltip', _title=('%s|%s' % (T('Role Required'), T('If this record should be restricted then select which role is required to access the record here.')))), ondelete='RESTRICT')
 return f()

def s3_role_required ( ) : T = current . T gtable = current . auth . settings . table_group represent = S3Represent ( lookup = 'auth_group' , fields = [ 'role' ] ) f = S3ReusableField ( 'role_required' , gtable , sortby = 'role' , requires = IS_EMPTY_OR ( IS_ONE_OF ( current . db , 'auth_group.id' , represent , zero = T ( 'Public' ) ) ) , represent = represent , label = T ( 'Role Required' ) , comment = DIV ( _class = 'tooltip' , _title = ( '%s|%s' % ( T ( 'Role Required' ) , T ( 'If this record should be restricted then select which role is required to access the record here.' ) ) ) ) , ondelete = 'RESTRICT' ) return f ( )
role required to access a resource - used by gis for map layer permissions management .