From: Vance K. <va...@us...> - 2006-02-23 06:25:08
|
User: vancek Date: 06/02/22 22:25:07 Modified: andromda-ejb3/src/main/resources/templates/ejb3 SessionBean.vsl Log: if security is enabled, render the @RolesAllowed annotation only if logical roles exists, otherwise if deny all is specified, then render @DenyAll, otherwise always render the @PermitAll annotation Revision Changes Path 1.17 +8 -4 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/SessionBean.vsl Index: SessionBean.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/SessionBean.vsl,v retrieving revision 1.16 retrieving revision 1.17 diff -u -w -r1.16 -r1.17 --- SessionBean.vsl 13 Feb 2006 15:46:37 -0000 1.16 +++ SessionBean.vsl 23 Feb 2006 06:25:06 -0000 1.17 @@ -290,13 +290,17 @@ @javax.ejb.TransactionAttribute(javax.ejb.TransactionAttributeType.${operation.transactionType}) #* *##end #* *##end -#* *##if ($operation.permitAll) - @javax.annotation.security.PermitAll -#* *##elseif ($operation.denyAll) +#* *##if ($service.securityEnabled) +#* *##if ($stringUtils.isBlank(${operation.rolesAllowed})) +#* *##if ($operation.denyAll) @javax.annotation.security.DenyAll -#* *##elseif ($operation.rolesAllowed) +#* *##else + @javax.annotation.security.PermitAll +#* *##end +#* *##else @javax.annotation.security.RolesAllowed({${operation.rolesAllowed}}) #* *##end +#* *##end #* *##if ($operation.flushMode) @javax.persistence.FlushMode(javax.persistence.FlushModeType.${operation.flushMode}) #* *##end |