mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-06 00:09:22 +00:00
### **PR Type**
Bug fix
___
### **Description**
Prevent null resource access in entity fetch
Preserve and gate 'org' permissions correctly
Minor formatting cleanup in template
Ensure permissions list always updated safely
___
### Diagram Walkthrough
```mermaid
flowchart LR
UI["EditRole.vue UI"] -- triggers --> getResourceEntities["getResourceEntities(resource)"]
getResourceEntities -- "guard: if !resource return" --> SafeReturn["Resolve(true)"]
setPermission["setPermission(...)"] -- "modify + checks" --> permissionsState["permissionsState.permissions"]
setPermission -- "skip non-meta org 'org' resource" --> GuardedPush["Conditional push"]
```
<details> <summary><h3> File Walkthrough</h3></summary>
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Bug
fix</strong></td><td><table>
<tr>
<td>
<details>
<summary><strong>EditRole.vue</strong><dd><code>Guard missing resources
and refine permission push</code>
</dd></summary>
<hr>
web/src/components/iam/roles/EditRole.vue
<ul><li>Add null-check guard in <code>getResourceEntities</code><br>
<li> Keep 'org' permission push with clearer formatting<br> <li> Ensure
conditional skip for non-meta org remains<br> <li> Minor template
formatting adjustment</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8038/files#diff-263b6bc7d29fdf8358c8437cd637f1350aa3733cc2706eae8ff00028686cc0f5">+11/-7</a>
</td>
</tr>
</table></td></tr></tr></tbody></table>
</details>
___