File size: 363 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
// @flow
import type { DBUsersCommunities } from 'shared/types';
export default ({
isModerator,
isOwner,
isBlocked,
isPending,
}: DBUsersCommunities) => {
const roles = [];
if (isModerator) roles.push('moderator');
if (isOwner) roles.push('admin');
if (isBlocked) roles.push('blocked');
if (isPending) roles.push('pending');
return roles;
};
|