groups: strengthen the admin check on cards

Before we saw if window.ship was in the path of the group.
If you're a star or higher, you'll match many group paths that you don't
own. This strengthens the check.
This commit is contained in:
Matilde Park 2020-03-19 18:15:36 -04:00
parent 83fc700d41
commit d1b73f7ae3

View File

@ -491,9 +491,9 @@ export class ContactCard extends Component {
? "dib" : "dn";
let adminOpt =
( (props.path.includes(window.ship) || (props.ship === window.ship)) &&
!(props.path.includes('/~/default'))
) ? "dib" : "dn";
((props.path.includes(`~${window.ship}/`)) || ((props.ship === window.ship) &&
!(props.path.includes('/~/default'))))
? "dib" : "dn";
let meLink = (props.path === "/~/default")
? `/~groups` : `/~groups/detail${props.path}`;