-2

在我的 grails 应用程序中:一个域类有 5 个字段。我希望第三个字段只能由管理员填写如何完成请帮助我

例子:

class abc {
    String f1
    String f2
    string f3
    string f4
    string f5 
    string constraints
}

现在我只希望管理员访问字符串 f3。其余用户禁用它请帮帮我......

4

1 回答 1

0

You can use bindData to limit which fields of a domain are being changed when you pass params to it. You could change the list of editable fields depending on whether a user or an admin is editing it.

于 2012-10-31T14:47:16.513 回答