File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
packages/r/karma1337/geo-resto Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -40,9 +40,12 @@ func (am *AuthManager) IsTrustedVerifier(addr string) bool {
4040
4141// AddTrustedVerifier allows the owner to add an address as a trusted verifier
4242func (am *AuthManager) AddTrustedVerifier(addr string, caller address) bool {
43- // Try to add via the external authorizable extension. That extension
44- // enforces owner-only access internally; we call it and mirror the
45- // change locally so we can query membership efficiently.
43+ // Owner-only check
44+ if am.Authorizable.Owner() != caller {
45+ return false
46+ }
47+
48+ // Add via the authorizable extension and mirror locally.
4649 err := am.Authorizable.AddToAuthList(address(addr))
4750 if err != nil {
4851 return false
@@ -53,6 +56,11 @@ func (am *AuthManager) AddTrustedVerifier(addr string, caller address) bool {
5356
5457// RemoveTrustedVerifier allows the owner to remove a trusted verifier
5558func (am *AuthManager) RemoveTrustedVerifier(addr string, caller address) bool {
59+ // Owner-only check
60+ if am.Authorizable.Owner() != caller {
61+ return false
62+ }
63+
5664 err := am.Authorizable.DeleteFromAuthList(address(addr))
5765 if err != nil {
5866 return false
You can’t perform that action at this time.
0 commit comments