mirror of
https://github.com/urbit/shrub.git
synced 2024-12-25 04:52:06 +03:00
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:
parent
83fc700d41
commit
d1b73f7ae3
@ -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}`;
|
||||
|
Loading…
Reference in New Issue
Block a user