<s> from django . conf import settings <EOL> class Middleware : <EOL> def process_request ( self , request ) : <EOL> request . view_access = ( settings . ANONYMOUS_ACCESS or <EOL> request . user . is_authenticated ( ) ) <EOL> request . write_access = request . user . is_authenticated ( ) </s>
