def add_group_type_access(context, group_type_id, project_id):
 if (group_type_id is None):
  msg = _('group_type_id cannot be None')
  raise exception.InvalidGroupType(reason=msg)
 elevated = (context if context.is_admin else context.elevated())
 if is_public_group_type(elevated, group_type_id):
  msg = _('Type access modification is not applicable to public group type.')
  raise exception.InvalidGroupType(reason=msg)
 return db.group_type_access_add(elevated, group_type_id, project_id)

def add_group_type_access ( context , group_type_id , project_id ) : if ( group_type_id is None ) : msg = _ ( 'group_type_id cannot be None' ) raise exception . InvalidGroupType ( reason = msg ) elevated = ( context if context . is_admin else context . elevated ( ) ) if is_public_group_type ( elevated , group_type_id ) : msg = _ ( 'Type access modification is not applicable to public group type.' ) raise exception . InvalidGroupType ( reason = msg ) return db . group_type_access_add ( elevated , group_type_id , project_id )
add access to group type for project_id .