def s3_ownerstamp():
 auth = current.auth
 utable = auth.settings.table_user
 s3_meta_owned_by_user = S3ReusableField('owned_by_user', utable, readable=False, writable=False, requires=None, default=(current.session.auth.user.id if auth.is_logged_in() else None), represent=(lambda id: ((id and s3_auth_user_represent(id)) or current.messages.UNKNOWN_OPT)), ondelete='RESTRICT')
 s3_meta_owned_by_group = S3ReusableField('owned_by_group', 'integer', readable=False, writable=False, requires=None, default=None, represent=S3Represent(lookup='auth_group', fields=['role']))
 s3_meta_realm_entity = S3ReusableField('realm_entity', 'integer', default=None, readable=False, writable=False, requires=None, represent=(lambda val: current.s3db.pr_pentity_represent(val)))
 return (s3_meta_owned_by_user(), s3_meta_owned_by_group(), s3_meta_realm_entity())

def s3_ownerstamp ( ) : auth = current . auth utable = auth . settings . table_user s3_meta_owned_by_user = S3ReusableField ( 'owned_by_user' , utable , readable = False , writable = False , requires = None , default = ( current . session . auth . user . id if auth . is_logged_in ( ) else None ) , represent = ( lambda id : ( ( id and s3_auth_user_represent ( id ) ) or current . messages . UNKNOWN_OPT ) ) , ondelete = 'RESTRICT' ) s3_meta_owned_by_group = S3ReusableField ( 'owned_by_group' , 'integer' , readable = False , writable = False , requires = None , default = None , represent = S3Represent ( lookup = 'auth_group' , fields = [ 'role' ] ) ) s3_meta_realm_entity = S3ReusableField ( 'realm_entity' , 'integer' , default = None , readable = False , writable = False , requires = None , represent = ( lambda val : current . s3db . pr_pentity_represent ( val ) ) ) return ( s3_meta_owned_by_user ( ) , s3_meta_owned_by_group ( ) , s3_meta_realm_entity ( ) )
record ownership meta-fields .