<s> from grouper . fe . util import GrouperHandler <EOL> from grouper . model_soup import Group <EOL> from grouper . models . audit_log import AuditLog <EOL> class GroupEnable ( GrouperHandler ) : <EOL> def post ( self , group_id = None , name = None ) : <EOL> group = Group . get ( self . session , group_id , name ) <EOL> if not group : <EOL> return self . notfound ( ) <EOL> members = group . my_members ( ) <EOL> if not self . current_user . my_role ( members ) in ( "<STR_LIT>" , "<STR_LIT>" ) : <EOL> return self . forbidden ( ) <EOL> group . enable ( ) <EOL> self . session . commit ( ) <EOL> AuditLog . log ( self . session , self . current_user . id , '<STR_LIT>' , <EOL> '<STR_LIT>' , on_group_id = group . id ) <EOL> return self . redirect ( "<STR_LIT>" . format ( group . name ) ) </s>
