    def group_model(self, group):
        """Get the JSON model for a Group object"""
        model = {
            'kind': 'group',
            'name': group.name,
            'roles': [r.name for r in group.roles],
            'users': [u.name for u in group.users],
            'properties': group.properties,
        }
        access_map = {
            'read:groups': {'kind', 'name', 'properties', 'users'},
            'read:groups:name': {'kind', 'name'},
            'read:roles:groups': {'kind', 'name', 'roles'},
        }
        model = self._filter_model(model, access_map, group, 'group')
        return model
Get the JSON model for a Group object
jupyterhub/apihandlers/base.py