0
我有這個@PreAuthorize註釋:JMSSecurityExtraBundle嵌套AND/OR表達式
@PreAuthorize("(hasRole('PERM_EDIT_ALL_CAMPAIGNS') or (has_role('PERM_EDIT_OWN_CAMPAIGNS') and isCampaignAccountManager(#id))) and (hasRole('PERM_EDIT_ALL_PUBLISHERS') or (has_role('PERM_EDIT_OWN_PUBLISHERS') and isAffiliateAccountManager(#paramFetcher.get('affiliate_id'))))")
我得到以下錯誤:
Expected primary expression, but got \u0022has_role\u0022 of type T_NONE at position 40 (0-based)
所以錯誤看起來像支架後開始出現在這裏:
(has_role('PERM_EDIT_OWN_CAMPAIGNS') and isCampaignAccountManager(#id)))
是否有任何方法來添加括號和/或表達式?
在此先感謝