#NEWLINE# @ require_collection_playable #NEWLINE# def get( self , collection_id ) : #NEWLINE# #INDENT# 'Handles GET requests.' #NEWLINE# try : #NEWLINE# #INDENT# collection = collection_services . get_collection_by_id ( collection_id ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# raise self . PageNotFoundException ( e ) #NEWLINE# #UNINDENT# whitelisted_usernames = config_domain . WHITELISTED_COLLECTION_EDITOR_USERNAMES . value #NEWLINE# self . values . update ( { #NEWLINE# #INDENT# 'can_edit' : ( bool ( self . username ) and ( self . username in whitelisted_usernames ) and ( self . username not in config_domain . BANNED_USERNAMES . value ) and rights_manager . Actor ( self . user_id ) . can_edit ( rights_manager . ACTIVITY_TYPE_COLLECTION , collection_id ) ) , #NEWLINE# 'is_logged_in' : bool ( self . user_id ) , #NEWLINE# 'collection_id' : collection_id , #NEWLINE# 'collection_title' : collection . title , #NEWLINE# 'collection_skills' : collection . skills , #NEWLINE# 'is_private' : rights_manager . is_collection_private ( collection_id ) , #NEWLINE# 'meta_name' : collection . title , #NEWLINE# 'meta_description' : utils . capitalize_string ( collection . objective ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . render_template ( 'collection_player/collection_player.html' )