From 924db68d0638172d3dbc280e1ca7dd321d9abed6 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Thu, 7 Jul 2022 15:52:55 +0200 Subject: [PATCH 01/14] setup community statistics --- backend/src/auth/RIGHTS.ts | 1 + .../src/graphql/model/CommunityStatistics.ts | 26 +++++++++++++++++++ .../graphql/resolver/StatisticsResolver.ts | 26 +++++++++++++++++++ 3 files changed, 53 insertions(+) create mode 100644 backend/src/graphql/model/CommunityStatistics.ts create mode 100644 backend/src/graphql/resolver/StatisticsResolver.ts diff --git a/backend/src/auth/RIGHTS.ts b/backend/src/auth/RIGHTS.ts index c10fc96de..cbf650ec1 100644 --- a/backend/src/auth/RIGHTS.ts +++ b/backend/src/auth/RIGHTS.ts @@ -44,4 +44,5 @@ export enum RIGHTS { LIST_CONTRIBUTION_LINKS = 'LIST_CONTRIBUTION_LINKS', DELETE_CONTRIBUTION_LINK = 'DELETE_CONTRIBUTION_LINK', UPDATE_CONTRIBUTION_LINK = 'UPDATE_CONTRIBUTION_LINK', + COMMUNITY_STATISTICS = 'COMMUNITY_STATISTICS', } diff --git a/backend/src/graphql/model/CommunityStatistics.ts b/backend/src/graphql/model/CommunityStatistics.ts new file mode 100644 index 000000000..61354115c --- /dev/null +++ b/backend/src/graphql/model/CommunityStatistics.ts @@ -0,0 +1,26 @@ +import { ObjectType, Field } from 'type-graphql' +import Decimal from 'decimal.js-light' + +@ObjectType() +export class CommunityStatistics { + @Field(() => Number) + totalUsers: number + + @Field(() => Number) + activeUsers: number + + @Field(() => Number) + deletedUsers: number + + @Field(() => Decimal) + totalGradidoCreated: Decimal + + @Field(() => Decimal) + totalGradidoDecayed: Decimal + + @Field(() => Decimal) + totalGradidoAvailable: Decimal + + @Field(() => Decimal) + totalGradidoUnbookedDecayed: Decimal +} diff --git a/backend/src/graphql/resolver/StatisticsResolver.ts b/backend/src/graphql/resolver/StatisticsResolver.ts new file mode 100644 index 000000000..a90d42f75 --- /dev/null +++ b/backend/src/graphql/resolver/StatisticsResolver.ts @@ -0,0 +1,26 @@ +import { Resolver, Query, Arg, Args, Authorized, Ctx, Int } from 'type-graphql' +import { RIGHTS } from '@/auth/RIGHTS' +import { CommunityStatistics } from '@model/CommunityStatistics' +import { User as DbUser } from '@entity/User' +import { getConnection } from '@dbTools/typeorm' +import Decimal from 'decimal.js-light' + +@Resolver() +export class StatisticsResolver { + @Authorized([RIGHTS.COMMUNITY_STATISTICS]) + @Query(() => CommunityStatistics) + async communityStatistics(): Promise { + const totalUsers = await DbUser.find({ withDeleted: true }) + console.log(totalUsers.length) + + return { + totalUsers: 12, + activeUsers: 6, + deletedUsers: 1, + totalGradidoCreated: new Decimal(3000), + totalGradidoDecayed: new Decimal(200), + totalGradidoAvailable: new Decimal(2800), + totalGradidoUnbookedDecayed: new Decimal(200), + } + } +} From df227607ad539ad0bc209eebed917d0a7b356bed Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Thu, 7 Jul 2022 17:27:50 +0200 Subject: [PATCH 02/14] get basic statistics from database --- .../graphql/resolver/StatisticsResolver.ts | 71 ++++++++++++++++--- 1 file changed, 61 insertions(+), 10 deletions(-) diff --git a/backend/src/graphql/resolver/StatisticsResolver.ts b/backend/src/graphql/resolver/StatisticsResolver.ts index a90d42f75..4c1500839 100644 --- a/backend/src/graphql/resolver/StatisticsResolver.ts +++ b/backend/src/graphql/resolver/StatisticsResolver.ts @@ -1,26 +1,77 @@ -import { Resolver, Query, Arg, Args, Authorized, Ctx, Int } from 'type-graphql' +import { Resolver, Query, Authorized } from 'type-graphql' import { RIGHTS } from '@/auth/RIGHTS' import { CommunityStatistics } from '@model/CommunityStatistics' import { User as DbUser } from '@entity/User' +import { Transaction as DbTransaction } from '@entity/Transaction' import { getConnection } from '@dbTools/typeorm' import Decimal from 'decimal.js-light' +import { calculateDecay } from '@/util/decay' @Resolver() export class StatisticsResolver { @Authorized([RIGHTS.COMMUNITY_STATISTICS]) @Query(() => CommunityStatistics) async communityStatistics(): Promise { - const totalUsers = await DbUser.find({ withDeleted: true }) - console.log(totalUsers.length) + const allUsers = await DbUser.find({ withDeleted: true }) + + let totalUsers = 0 + let activeUsers = 0 + let deletedUsers = 0 + + let totalGradidoAvailable: Decimal = new Decimal(0) + let totalGradidoUnbookedDecayed: Decimal = new Decimal(0) + + const receivedCallDate = new Date() + + for (let i = 0; i < allUsers.length; i++) { + if (allUsers[i].deletedAt) { + deletedUsers++ + } else { + totalUsers++ + const lastTransaction = await DbTransaction.findOne({ + where: { userId: allUsers[i].id }, + order: { balanceDate: 'DESC' }, + }) + if (lastTransaction) { + activeUsers++ + const decay = calculateDecay( + lastTransaction.balance, + lastTransaction.balanceDate, + receivedCallDate, + ) + if (decay) { + totalGradidoAvailable = totalGradidoAvailable.plus(decay.balance.toString()) + totalGradidoUnbookedDecayed = totalGradidoUnbookedDecayed.plus(decay.decay.toString()) + } + } + } + } + + const queryRunner = getConnection().createQueryRunner() + await queryRunner.connect() + + const { totalGradidoCreated } = await queryRunner.manager + .createQueryBuilder() + .select('SUM(transaction.amount) AS totalGradidoCreated') + .from(DbTransaction, 'transaction') + .where('transaction.typeId = 1') + .getRawOne() + + const { totalGradidoDecayed } = await queryRunner.manager + .createQueryBuilder() + .select('SUM(transaction.decay) AS totalGradidoDecayed') + .from(DbTransaction, 'transaction') + .where('transaction.decay IS NOT NULL') + .getRawOne() return { - totalUsers: 12, - activeUsers: 6, - deletedUsers: 1, - totalGradidoCreated: new Decimal(3000), - totalGradidoDecayed: new Decimal(200), - totalGradidoAvailable: new Decimal(2800), - totalGradidoUnbookedDecayed: new Decimal(200), + totalUsers, + activeUsers, + deletedUsers, + totalGradidoCreated, + totalGradidoDecayed, + totalGradidoAvailable, + totalGradidoUnbookedDecayed, } } } From baa5084f5d6365485f1af3a109e5dcd771155eed Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Thu, 7 Jul 2022 17:29:09 +0200 Subject: [PATCH 03/14] add query for communty statistics --- admin/src/graphql/communityStatistics.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 admin/src/graphql/communityStatistics.js diff --git a/admin/src/graphql/communityStatistics.js b/admin/src/graphql/communityStatistics.js new file mode 100644 index 000000000..868bfd02a --- /dev/null +++ b/admin/src/graphql/communityStatistics.js @@ -0,0 +1,15 @@ +import gql from 'graphql-tag' + +export const communityStatistics = gql` + query { + communityStatistics { + totalUsers + activeUsers + deletedUsers + totalGradidoCreated + totalGradidoDecayed + totalGradidoAvailable + totalGradidoUnbookedDecayed + } + } +` From d0d4b151dc9451925d6ab928817bf730b1efd223 Mon Sep 17 00:00:00 2001 From: elweyn Date: Wed, 10 Aug 2022 11:27:05 +0200 Subject: [PATCH 04/14] Add rights and roles to query admins and moderators. --- backend/src/auth/RIGHTS.ts | 1 + backend/src/auth/ROLES.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/backend/src/auth/RIGHTS.ts b/backend/src/auth/RIGHTS.ts index d5e2cc7ce..bb722246a 100644 --- a/backend/src/auth/RIGHTS.ts +++ b/backend/src/auth/RIGHTS.ts @@ -30,6 +30,7 @@ export enum RIGHTS { LIST_CONTRIBUTIONS = 'LIST_CONTRIBUTIONS', LIST_ALL_CONTRIBUTIONS = 'LIST_ALL_CONTRIBUTIONS', UPDATE_CONTRIBUTION = 'UPDATE_CONTRIBUTION', + SEARCH_ADMIN_USERS = 'SEARCH_ADMIN_USERS', // Admin SEARCH_USERS = 'SEARCH_USERS', SET_USER_ROLE = 'SET_USER_ROLE', diff --git a/backend/src/auth/ROLES.ts b/backend/src/auth/ROLES.ts index 9dcba0a4b..7d8025ab9 100644 --- a/backend/src/auth/ROLES.ts +++ b/backend/src/auth/ROLES.ts @@ -28,6 +28,7 @@ export const ROLE_USER = new Role('user', [ RIGHTS.LIST_CONTRIBUTIONS, RIGHTS.LIST_ALL_CONTRIBUTIONS, RIGHTS.UPDATE_CONTRIBUTION, + RIGHTS.SEARCH_ADMIN_USERS, ]) export const ROLE_ADMIN = new Role('admin', Object.values(RIGHTS)) // all rights From 304732bdade175a4ed56784e5904b327c97488c2 Mon Sep 17 00:00:00 2001 From: elweyn Date: Wed, 10 Aug 2022 11:27:27 +0200 Subject: [PATCH 05/14] Add model for AdminUser --- backend/src/graphql/model/AdminUser.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 backend/src/graphql/model/AdminUser.ts diff --git a/backend/src/graphql/model/AdminUser.ts b/backend/src/graphql/model/AdminUser.ts new file mode 100644 index 000000000..8ddca69a0 --- /dev/null +++ b/backend/src/graphql/model/AdminUser.ts @@ -0,0 +1,25 @@ +import { User } from "@entity/User" +import { Field, Int, ObjectType } from "type-graphql" + +@ObjectType() +export class AdminUser { + constructor(user: User) { + this.firstName = user.firstName + this.lastName = user.lastName + } + + @Field(() => String) + firstName: string + + @Field(() => String) + lastName: string +} + +@ObjectType() +export class SearchAdminUsersResult { + @Field(() => Int) + userCount: number + + @Field(() => [AdminUser]) + userList: AdminUser[] +} From c46f2f241ec6d78f4c593aca4c042337d8e6f35d Mon Sep 17 00:00:00 2001 From: elweyn Date: Wed, 10 Aug 2022 11:28:21 +0200 Subject: [PATCH 06/14] Create resolver method to query admin and moderator users. --- backend/src/graphql/resolver/UserResolver.ts | 46 +++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/backend/src/graphql/resolver/UserResolver.ts b/backend/src/graphql/resolver/UserResolver.ts index a89a8cb0b..b54651a2b 100644 --- a/backend/src/graphql/resolver/UserResolver.ts +++ b/backend/src/graphql/resolver/UserResolver.ts @@ -3,7 +3,7 @@ import { backendLogger as logger } from '@/server/logger' import { Context, getUser } from '@/server/context' import { Resolver, Query, Args, Arg, Authorized, Ctx, UseMiddleware, Mutation } from 'type-graphql' -import { getConnection } from '@dbTools/typeorm' +import { getConnection, getCustomRepository, IsNull, Not } from '@dbTools/typeorm' import CONFIG from '@/config' import { User } from '@model/User' import { User as DbUser } from '@entity/User' @@ -32,6 +32,10 @@ import { EventSendConfirmationEmail, } from '@/event/Event' import { getUserCreation } from './util/creations' +import { UserRepository } from '@/typeorm/repository/User' +import { SearchAdminUsersResult } from '@model/AdminUser' +import Paginated from '@arg/Paginated' +import { Order } from '@enum/Order' // eslint-disable-next-line @typescript-eslint/no-var-requires const sodium = require('sodium-native') @@ -731,6 +735,46 @@ export class UserResolver { logger.debug(`has ElopageBuys = ${elopageBuys}`) return elopageBuys } + + @Authorized([RIGHTS.SEARCH_ADMIN_USERS]) + @Query(() => SearchAdminUsersResult) + async searchAdminUsers( + @Args() + { currentPage = 1, pageSize = 25, order = Order.DESC }: Paginated, + ): Promise { + const userRepository = getCustomRepository(UserRepository) + + const [users, count] = await userRepository.findAndCount({ + where: { + isAdmin: Not(IsNull()), + }, + order: { + createdAt: order, + }, + skip: (currentPage - 1) * pageSize, + take: pageSize, + }) + + if (users.length === 0) { + return { + userCount: 0, + userList: [], + } + } + + const adminUsers = await Promise.all( + users.map((user) => { + return { + firstName: user.firstName, + lastName: user.lastName, + } + }), + ) + return { + userCount: count, + userList: adminUsers, + } + } } const isTimeExpired = (optIn: LoginEmailOptIn, duration: number): boolean => { From d3238fd48666a0c9083a47642eb658b1a8f7646c Mon Sep 17 00:00:00 2001 From: elweyn Date: Mon, 15 Aug 2022 11:05:11 +0200 Subject: [PATCH 07/14] Fix linting. --- backend/src/auth/RIGHTS.ts | 1 - backend/src/auth/ROLES.ts | 3 --- backend/src/graphql/model/AdminUser.ts | 4 ++-- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/backend/src/auth/RIGHTS.ts b/backend/src/auth/RIGHTS.ts index 934efd866..0152e89df 100644 --- a/backend/src/auth/RIGHTS.ts +++ b/backend/src/auth/RIGHTS.ts @@ -32,7 +32,6 @@ export enum RIGHTS { UPDATE_CONTRIBUTION = 'UPDATE_CONTRIBUTION', LIST_CONTRIBUTION_LINKS = 'LIST_CONTRIBUTION_LINKS', SEARCH_ADMIN_USERS = 'SEARCH_ADMIN_USERS', - // Admin SEARCH_USERS = 'SEARCH_USERS', SET_USER_ROLE = 'SET_USER_ROLE', diff --git a/backend/src/auth/ROLES.ts b/backend/src/auth/ROLES.ts index 87bb46bac..434dc11a4 100644 --- a/backend/src/auth/ROLES.ts +++ b/backend/src/auth/ROLES.ts @@ -28,11 +28,8 @@ export const ROLE_USER = new Role('user', [ RIGHTS.LIST_CONTRIBUTIONS, RIGHTS.LIST_ALL_CONTRIBUTIONS, RIGHTS.UPDATE_CONTRIBUTION, -<<<<<<< HEAD RIGHTS.SEARCH_ADMIN_USERS, -======= RIGHTS.LIST_CONTRIBUTION_LINKS, ->>>>>>> master ]) export const ROLE_ADMIN = new Role('admin', Object.values(RIGHTS)) // all rights diff --git a/backend/src/graphql/model/AdminUser.ts b/backend/src/graphql/model/AdminUser.ts index 8ddca69a0..92a22b7f1 100644 --- a/backend/src/graphql/model/AdminUser.ts +++ b/backend/src/graphql/model/AdminUser.ts @@ -1,5 +1,5 @@ -import { User } from "@entity/User" -import { Field, Int, ObjectType } from "type-graphql" +import { User } from '@entity/User' +import { Field, Int, ObjectType } from 'type-graphql' @ObjectType() export class AdminUser { From beb563ac5cb72578094a5a1ede0ee1eb5da02fa9 Mon Sep 17 00:00:00 2001 From: elweyn Date: Wed, 17 Aug 2022 10:05:56 +0200 Subject: [PATCH 08/14] Fix changes. --- backend/src/graphql/resolver/UserResolver.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/backend/src/graphql/resolver/UserResolver.ts b/backend/src/graphql/resolver/UserResolver.ts index 0368d7a31..09790f846 100644 --- a/backend/src/graphql/resolver/UserResolver.ts +++ b/backend/src/graphql/resolver/UserResolver.ts @@ -793,7 +793,12 @@ export class UserResolver { ) return { userCount: count, - userList: adminUsers, + userList: users.map((user) => { + return { + firstName: user.firstName, + lastName: user.lastName, + } + }), } } } From a44bcc00e22b43e533799f3e78a60bfd48410ef1 Mon Sep 17 00:00:00 2001 From: elweyn Date: Wed, 17 Aug 2022 10:09:12 +0200 Subject: [PATCH 09/14] Remove unused code. --- backend/src/graphql/resolver/UserResolver.ts | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/backend/src/graphql/resolver/UserResolver.ts b/backend/src/graphql/resolver/UserResolver.ts index 09790f846..ff11c841e 100644 --- a/backend/src/graphql/resolver/UserResolver.ts +++ b/backend/src/graphql/resolver/UserResolver.ts @@ -776,21 +776,6 @@ export class UserResolver { take: pageSize, }) - if (users.length === 0) { - return { - userCount: 0, - userList: [], - } - } - - const adminUsers = await Promise.all( - users.map((user) => { - return { - firstName: user.firstName, - lastName: user.lastName, - } - }), - ) return { userCount: count, userList: users.map((user) => { From f96fb5aa638647eeaabc9f760d669e27a2478e58 Mon Sep 17 00:00:00 2001 From: elweyn Date: Wed, 17 Aug 2022 10:21:40 +0200 Subject: [PATCH 10/14] Add searchAdminUsers query to mocks. --- backend/src/seeds/graphql/queries.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/backend/src/seeds/graphql/queries.ts b/backend/src/seeds/graphql/queries.ts index 9f7a02e70..3bd042ac2 100644 --- a/backend/src/seeds/graphql/queries.ts +++ b/backend/src/seeds/graphql/queries.ts @@ -280,3 +280,15 @@ export const listContributionLinks = gql` } } ` + +export const searchAdminUsers = gql` + query { + searchAdminUsers { + userCount + userList { + firstName + lastName + } + } + } +` From 6c707eae59990be6aa32bc39658daf8c3d911fe3 Mon Sep 17 00:00:00 2001 From: elweyn Date: Wed, 17 Aug 2022 10:22:08 +0200 Subject: [PATCH 11/14] Start tests for searchAdminUsers. --- backend/src/graphql/resolver/UserResolver.test.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/backend/src/graphql/resolver/UserResolver.test.ts b/backend/src/graphql/resolver/UserResolver.test.ts index 35a569c4b..fdfc31467 100644 --- a/backend/src/graphql/resolver/UserResolver.test.ts +++ b/backend/src/graphql/resolver/UserResolver.test.ts @@ -5,7 +5,7 @@ import { testEnvironment, headerPushMock, resetToken, cleanDB, resetEntity } fro import { userFactory } from '@/seeds/factory/user' import { bibiBloxberg } from '@/seeds/users/bibi-bloxberg' import { createUser, setPassword, forgotPassword, updateUserInfos } from '@/seeds/graphql/mutations' -import { login, logout, verifyLogin, queryOptIn } from '@/seeds/graphql/queries' +import { login, logout, verifyLogin, queryOptIn, searchAdminUsers } from '@/seeds/graphql/queries' import { GraphQLError } from 'graphql' import { LoginEmailOptIn } from '@entity/LoginEmailOptIn' import { User } from '@entity/User' @@ -878,6 +878,19 @@ bei Gradidio sei dabei!`, }) }) }) + + describe('searchAdminUsers', () => { + describe('unauthenticated', () => { + it('throws an error', async () => { + resetToken() + await expect(mutate({ mutation: searchAdminUsers })).resolves.toEqual( + expect.objectContaining({ + errors: [new GraphQLError('401 Unauthorized')], + }), + ) + }) + }) + }) }) describe('printTimeDuration', () => { From 1c301d34a2637f727697def347e64c9e0ca1a7e5 Mon Sep 17 00:00:00 2001 From: elweyn Date: Wed, 17 Aug 2022 11:37:13 +0200 Subject: [PATCH 12/14] Test for searchAdminUsers. --- .../src/graphql/resolver/UserResolver.test.ts | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/backend/src/graphql/resolver/UserResolver.test.ts b/backend/src/graphql/resolver/UserResolver.test.ts index fdfc31467..c7727ca5f 100644 --- a/backend/src/graphql/resolver/UserResolver.test.ts +++ b/backend/src/graphql/resolver/UserResolver.test.ts @@ -21,6 +21,7 @@ import { ContributionLink } from '@model/ContributionLink' import { logger } from '@test/testSetup' import { validate as validateUUID, version as versionUUID } from 'uuid' +import { peterLustig } from '@/seeds/users/peter-lustig' // import { klicktippSignIn } from '@/apis/KlicktippController' @@ -890,6 +891,38 @@ bei Gradidio sei dabei!`, ) }) }) + + describe('authenticated', () => { + beforeAll(async () => { + await userFactory(testEnv, bibiBloxberg) + await userFactory(testEnv, peterLustig) + await query({ + query: login, + variables: { + email: 'bibi@bloxberg.de', + password: 'Aa12345_', + }, + }) + }) + + it('finds peter@lustig.de', async () => { + await expect(mutate({ mutation: searchAdminUsers })).resolves.toEqual( + expect.objectContaining({ + data: { + searchAdminUsers: { + userCount: 1, + userList: expect.arrayContaining([ + expect.objectContaining({ + firstName: 'Peter', + lastName: 'Lustig', + }), + ]), + }, + }, + }), + ) + }) + }) }) }) From b1a17c52ecdf6be3923f82fd31ba401190605581 Mon Sep 17 00:00:00 2001 From: elweyn Date: Wed, 17 Aug 2022 12:46:29 +0200 Subject: [PATCH 13/14] Add community_statistics to user ROLES. --- backend/src/auth/ROLES.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/src/auth/ROLES.ts b/backend/src/auth/ROLES.ts index 500c8bec4..25dc3dc92 100644 --- a/backend/src/auth/ROLES.ts +++ b/backend/src/auth/ROLES.ts @@ -29,6 +29,7 @@ export const ROLE_USER = new Role('user', [ RIGHTS.LIST_ALL_CONTRIBUTIONS, RIGHTS.UPDATE_CONTRIBUTION, RIGHTS.LIST_CONTRIBUTION_LINKS, + RIGHTS.COMMUNITY_STATISTICS, ]) export const ROLE_ADMIN = new Role('admin', Object.values(RIGHTS)) // all rights From 194d4a6ad2c9ddb3f3664d047c7c2a638f1d518f Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Wed, 17 Aug 2022 15:15:35 +0200 Subject: [PATCH 14/14] move right COMMUNITY_STATISTICS to user rights --- backend/src/auth/RIGHTS.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/auth/RIGHTS.ts b/backend/src/auth/RIGHTS.ts index a58d0aa2b..6e1c1e63b 100644 --- a/backend/src/auth/RIGHTS.ts +++ b/backend/src/auth/RIGHTS.ts @@ -31,6 +31,7 @@ export enum RIGHTS { LIST_ALL_CONTRIBUTIONS = 'LIST_ALL_CONTRIBUTIONS', UPDATE_CONTRIBUTION = 'UPDATE_CONTRIBUTION', LIST_CONTRIBUTION_LINKS = 'LIST_CONTRIBUTION_LINKS', + COMMUNITY_STATISTICS = 'COMMUNITY_STATISTICS', // Admin SEARCH_USERS = 'SEARCH_USERS', SET_USER_ROLE = 'SET_USER_ROLE', @@ -48,5 +49,4 @@ export enum RIGHTS { CREATE_CONTRIBUTION_LINK = 'CREATE_CONTRIBUTION_LINK', DELETE_CONTRIBUTION_LINK = 'DELETE_CONTRIBUTION_LINK', UPDATE_CONTRIBUTION_LINK = 'UPDATE_CONTRIBUTION_LINK', - COMMUNITY_STATISTICS = 'COMMUNITY_STATISTICS', }