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.
@@ -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}`;
