Looking at the @Restrict annotation I see that any objects in the Seam Context can be referenced (such as 'selectedAccount' below):
@Name("account")
public class AccountAction {
@In Account selectedAccount;
@Restrict("#{s:hasPermission('account','modify',selectedAccount)}")
public void modify() {
selectedAccount.modify();
}
}You can assert objects directly into the security context with RuleBasedIdentity.getSecurityContext().assertObject(), without having to place them into a Seam context first.