blob: d8dddd687bccc2cd393379ad722541d03ed00ba6 [file] [log] [blame]
Adrià Vilanova Martínezf19ea432024-01-23 20:20:52 +01001# Copyright 2016 The Chromium Authors
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
Copybara854996b2021-09-07 19:36:02 +00004
5"""View objects to help display users and groups in UI templates."""
6from __future__ import print_function
7from __future__ import division
8from __future__ import absolute_import
9
10import logging
11
12
13class GroupView(object):
14 """Class to make it easier to display user group metadata."""
15
16 def __init__(self, name, num_members, group_settings, group_id):
17 self.name = name
18 self.num_members = num_members
19 self.who_can_view_members = str(group_settings.who_can_view_members)
20 self.group_id = group_id
21
22 self.detail_url = '/g/%s/' % group_id