【问题标题】:Joomla ACL custom actionsJoomla ACL 自定义操作
【发布时间】:2013-05-28 00:48:47
【问题描述】:

我正在创建一个自定义 (1.6) 组件,用户可以在其中预订露营地。如果用户想使用他们已经存储的资金/信用,他们将被要求登录。只有某些团体可以使用这些资金/积分。

我已经创建了一个 access.xml 文件:

<?xml version="1.0" encoding="UTF-8"?>
<access component="com_propbooker">
  <section name="booking">
    <action name="booking.create" title="Book Site" description="Allows users of this group to book sites." />
  </section>
</access>

还有我的 config.xml 文件:

<config>
  <fieldset name="API Configuration" label="API Configuration">
    <field name="google_api_key" label="Google API Key" type="text" size="50" default="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" />
  </fieldset>
  <fieldset name="Booking Permissions" label="Booking Permissions" description="Set Groups that can book sites">
    <field name="booking_permission" label="Booking Permission" type="rules" class="inputbox" validate="rules" filter="rules" component="com_propbooker" section="booking" />
  </fieldset>
</config>

当我单击选项按钮时,一切正常,但没有保存任何更改。当我点击“保存”按钮时,它总是翻转回“继承”。

提前感谢您的任何见解。

【问题讨论】:

    标签: joomla2.5


    【解决方案1】:

    尝试在 config.xml 中使用 permissions 作为字段集名称和 rules 作为字段名称。 像这样:

    <fieldset name="permissions"
        label="JCONFIG_PERMISSIONS_LABEL"
        description="JCONFIG_PERMISSIONS_DESC" >
        <field name="rules"
            type="rules"
            label="JCONFIG_PERMISSIONS_LABEL"
            class="inputbox"
            validate="rules"
            filter="rules"
            component="com_propbooker"
            section="booking"
        />
    </fieldset>
    

    我也会考虑使用部分名称component,因为它是默认命名。但您的需求可能会有所不同。

    【讨论】:

    • TYVM,魔鬼总是在细节中。
    猜你喜欢
    • 2012-04-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-09-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多