PLT-5049 (Webapp) New Channel Members UI. (#5036)

This replaces the existing Channel Members UI with one based on the Team
Members UI, so that either a button, a role or a role with a menu can be
displayed.

Basic logic for which actions and roles are displayed is implemented,
although this doesn't change behaviour or functionality at all, as that
will come in later PRs. It does, however, add code to fetch the
ChannelMember objects as that is necessary to provide the full set of
actions and roles as intended.
Этот коммит содержится в:
George Goldberg
2017-01-15 15:40:43 +00:00
коммит произвёл Joram Wilander
родитель 2010f74a21
Коммит 95251258f5
10 изменённых файлов: 543 добавлений и 150 удалений

Просмотреть файл

@@ -74,6 +74,7 @@ export const ActionTypes = keyMirror({
RECEIVED_MORE_CHANNELS: null,
RECEIVED_CHANNEL_STATS: null,
RECEIVED_MY_CHANNEL_MEMBERS: null,
RECEIVED_MEMBERS_IN_CHANNEL: null,
FOCUS_POST: null,
RECEIVED_POSTS: null,

Просмотреть файл

@@ -54,6 +54,14 @@ export function isInRole(roles, inRole) {
return false;
}
export function isChannelAdmin(roles) {
if (isInRole(roles, 'channel_admin')) {
return true;
}
return false;
}
export function isAdmin(roles) {
if (isInRole(roles, 'team_admin')) {
return true;