Token导航 LogoToken导航TokenDH.com
开发只读github未标认证来源可访问许可证需确认审计通过

odoo-security-rulesodoo 安全规则

Agent Skill

用于辅助安全审计、权限检查、凭据风险、认证流程和常见漏洞排查。它适合让 Agent 梳理敏感配置、检查依赖风险、分析鉴权逻辑或生成安全复核清单。使用时不能把工具输出直接当最终结论,涉及密钥、令牌、用户数据或生产系统时,应先确认最小权限、脱敏方式和操作边界。

总安装

717

周安装

29

GitHub Stars

35,715

下载量

225
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:odoo-security-rules(odoo 安全规则)
来源仓库:https://github.com/sickn33/antigravity-awesome-skills
仓库路径:skills/odoo-security-rules
安装命令:
npx skills add https://github.com/sickn33/antigravity-awesome-skills --skill odoo-security-rules
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/sickn33/antigravity-awesome-skills --skill odoo-security-rules

简介

odoo-security-rules 用于辅助安全审计、权限检查、凭据风险和认证流程排查,适合让 Agent 梳理敏感配置或生成安全复核清单。

  • 适用于 Odoo 安全规则相关的开发任务,需确认最小权限和操作边界。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装,需确认权限范围和维护状态。
  • 涉及密钥、令牌或生产系统时,应先确认脱敏方式和操作边界,不能将工具输出直接当最终结论。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Odoo Security Rules

Overview

Security in Odoo is managed at two levels: model-level access (who can read/write which models) and record-level rules (which records a user can see). This skill helps you write correct ir.model.access.csv entries and ir.rule domain-based record rules.

When to Use This Skill

  • Setting up access rights for a new custom module.
  • Restricting records so users only see their own data or their company's data.
  • Debugging "Access Denied" or "You are not allowed to access" errors.
  • Implementing multi-company record visibility rules.

How It Works

  1. Activate: Mention @odoo-security-rules and describe the access scenario.
  2. Generate: Get correct CSV access lines and XML record rules.
  3. Debug: Paste an access error and get a diagnosis with the fix.

Examples

Example 1: ir.model.access.csv

id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_hospital_patient_user,hospital.patient.user,model_hospital_patient,base.group_user,1,0,0,0
access_hospital_patient_manager,hospital.patient.manager,model_hospital_patient,base.group_erp_manager,1,1,1,1
Note: Use base.group_erp_manager for ERP managers, not base.group_system — that group is reserved for Odoo's technical superusers. Always create a custom group for module-specific manager roles: ``xml <record id="group_hospital_manager" model="res.groups"> <field name="name">Hospital Manager</field> <field name="category_id" ref="base.module_category_hidden"/> </record> ``

Example 2: Record Rule — Users See Only Their Own Records

<record id="rule_hospital_patient_own" model="ir.rule">
    <field name="name">Hospital Patient: Own Records Only</field>
    <field name="model_id" ref="model_hospital_patient"/>
    <field name="domain_force">[('create_uid', '=', user.id)]</field>
    <field name="groups" eval="[(4, ref('base.group_user'))]"/>
    <field name="perm_read" eval="True"/>
    <field name="perm_write" eval="True"/>
    <field name="perm_create" eval="True"/>
    <field name="perm_unlink" eval="False"/>
</record>
Important: If you omit <field name="groups">, the rule becomes global and applies to ALL users, including admins. Always assign a group unless you explicitly intend a global restriction.

Example 3: Multi-Company Record Rule

<record id="rule_hospital_patient_company" model="ir.rule">
    <field name="name">Hospital Patient: Multi-Company</field>
    <field name="model_id" ref="model_hospital_patient"/>
    <field name="domain_force">
        ['|', ('company_id', '=', False),
               ('company_id', 'in', company_ids)]
    </field>
    <field name="groups" eval="[(4, ref('base.group_user'))]"/>
</record>

Best Practices

  • Do: Start with the most restrictive access and open up as needed.
  • Do: Use company_ids (plural) in multi-company rules — it includes all companies the user belongs to.
  • Do: Test rules using a non-admin user in debug mode — sudo() bypasses all record rules entirely.
  • Do: Create dedicated security groups per module rather than reusing core Odoo groups.
  • Don't: Give perm_unlink = 1 to regular users unless deletion is explicitly required by the business process.
  • Don't: Leave group_id blank in ir.model.access.csv unless you intend to grant public (unauthenticated) access.
  • Don't: Use base.group_system for module managers — that grants full technical access including server configurations.

Limitations

  • Does not cover field-level access control (ir.model.fields read/write restrictions) — those require custom OWL or Python overrides.
  • Portal and public user access rules have additional nuances not fully covered here; test carefully with base.group_portal.
  • Record rules are bypassed by sudo() — any code running in superuser context ignores all ir.rule entries.
  • Does not cover row-level security via PostgreSQL (RLS) — Odoo manages all security at the ORM layer.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.22%
按下载量换算79

Claude

28.02%
按下载量换算63

Cursor

18.71%
按下载量换算42

Gemini CLI

9.45%
按下载量换算21

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills