I am the admin on my workspace and we have a “workspace visible” board on which I am listed as an Admin. (My avatar has the admin stripes and when I click on my avatar, it says that my permission level is Admin.)
However, when I get the board’s memberships from the REST API, my permission level is shown as “normal”. I discovered this when trying to get into the settings on one of our custom power ups where we lookup the current user’s permission level on the board and only let board admins change the settings.
Any idea how this happened or more importantly how to fix it?
Here is the Power Up code showing how we get membership information for the current user:
export const currentUserMembership = (t: any) => {
return trello.Promise.all([
t.member('all'),
t.board('name', 'memberships')
]).then((results: any[]) => {
const [member, board] = results;
if (member && board) {
const membership = board.memberships?.find(m => m.idMember === member.id);
return {
...member,
memberType: membership?.memberType
};
}
//else
return member;
});
};