10-18-2011 09:47 AM
package alfresco.web.action.evaluator;
import org.alfresco.web.action.evaluator.BaseActionEvaluator;
import org.alfresco.web.bean.repository.Node;
public class CompruevaCreacion extends BaseActionEvaluator {
public boolean creacion(Node node){
boolean ok=false;
if(node.hasPermission("Creacion")) ok=true;
return ok;
}
}
<action id="moveToEdicion">
<permissions>
<permission allow="true">Creacion</permission>
</permissions>
<evaluator>org.alfresco.web.action.evaluator.BaseAactionEvaluator.CompruevaCreacion</evaluator>
<label>Mover la carpeta a edicion</label>
<image>/images/icons/edit_form.gif</image>
<tooltip>Mover estado</tooltip>
<script>/Company Home/Data Dictionary/Scripts/cM_mouEdicion.js</script>
<params>
<param name="id">#{actionContext.id}</param>
</params>
</action>
10-19-2011 03:32 AM
10-19-2011 12:45 PM
<permissionGroup name="Creacion" allowFullControl="false" expose="true">
<includePermissionGroup permissionGroup="Collaborator" type="cm:cmobject" />
</permissionGroup>
<!– estat edicio –>
<permissionGroup name="Edicion" allowFullControl="false" expose="true">
<includePermissionGroup permissionGroup="Collaborator" type="cm:cmobject" />
</permissionGroup>
<!– estat acceptacio –>
<permissionGroup name="Acceptacion" allowFullControl="false" expose="true">
<includePermissionGroup permissionGroup="Collaborator" type="cm:cmobject" />
</permissionGroup>
<!– estat reedicio –>
<permissionGroup name="Reedicion" allowFullControl="false" expose="true">
<includePermissionGroup permissionGroup="Collaborator" type="cm:cmobject" />
</permissionGroup>
<!– estat publicacio –>
<permissionGroup name="Publicacion" allowFullControl="false" expose="true">
<includePermissionGroup permissionGroup="Collaborator" type="cm:cmobject" />
</permissionGroup>
<!– estat historic –>
<permissionGroup name="Historico" allowFullControl="false" expose="true">
<includePermissionGroup permissionGroup="Collaborator" type="cm:cmobject" />
</permissionGroup>
<action id="moveToEdicio">
<!–<evaluator>alfresco.extension.ComprovaPermisosAccions.ComprovaEdicio</evaluator> –>
<evaluator>cM_permisosAccions.ComprovaEdicio</evaluator>
<!–
<permissions>
<permission allow="true">Creacio</permission>
</permissions>
–>
<!–<evaluator>org.alfresco.web.action.evaluator.BaseAactionEvaluator.ComprovaCreacio</evaluator>–>
<label>Moure la carpeta a Edicio</label>
<image>/images/icons/edit_form.gif</image>
<tooltip>Moure destat</tooltip>
<script>/Company Home/Data Dictionary/Scripts/cM_mouEdicio.js</script>
<params>
<param name="id">#{actionContext.id}</param>
</params>
</action>
package cM_permisosAccions;
import javax.faces.context.FacesContext;
import org.alfresco.web.action.ActionEvaluator;
import org.alfresco.web.bean.repository.Node;
public class ComprovaEdicio implements ActionEvaluator {
@Override
public boolean evaluate(Node node) {
return (node.hasPermission("Edicio"));
}
@Override
public boolean evaluate(Object node) {
// TODO Auto-generated method stub
return false;
}
}
javax.faces.FacesException: javax.servlet.ServletException: java.lang.StackOverflowError
caused by:
org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.StackOverflowError
caused by:
javax.servlet.ServletException: java.lang.StackOverflowError
caused by:
java.lang.StackOverflowError
(por eso he explicado la versión en la que estaba trabajando, que no sé si tiene nada que ver…)10-20-2011 06:16 AM
<permissionGroup name="Edicion" allowFullControl="false" expose="true">
10-20-2011 06:29 AM
10-20-2011 06:46 AM
10-20-2011 06:47 AM
10-21-2011 06:16 AM
10-21-2011 06:34 AM
10-22-2011 10:04 PM
package cM_permisosAccions;
import org.alfresco.web.action.ActionEvaluator;
import org.alfresco.web.bean.repository.Node;
import org.alfresco.service.namespace.QName;
public class ComprovaEdicio implements ActionEvaluator {
@Override
public boolean evaluate(Node node) {
QName aspect_creacio = QName.createQName("http://www.alfresco.com/model/aspectes-model/1.0", "aspect-creacio");
return (node.hasAspect(aspect_creacio));
}
@Override
public boolean evaluate(Object node) {
// TODO Auto-generated method stub
return false;
}
}
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.