]> git.llucax.com Git - mecon/samurai.git/commitdiff
Se agrega SAMURAI_Perm para manejar los permisos desde las aplicaciones.
authorLeandro Lucarella <llucax@gmail.com>
Thu, 31 Jul 2003 21:24:35 +0000 (21:24 +0000)
committerLeandro Lucarella <llucax@gmail.com>
Thu, 31 Jul 2003 21:24:35 +0000 (21:24 +0000)
doc/uml/Samurai.xmi
lib/SAMURAI/Perm.php [new file with mode: 0644]

index a94e688576d8b96b3d9fedf60acf1c8161f04c80..524059635f7492cde7ceda424cc1de18b01fdc15 100644 (file)
@@ -3,13 +3,13 @@
  <XMI.header>
   <XMI.documentation>
    <XMI.exporter>umbrello uml modeller http://uml.sf.net</XMI.exporter>
-   <XMI.exporterVersion>1.1</XMI.exporterVersion>
+   <XMI.exporterVersion>1.1.5</XMI.exporterVersion>
   </XMI.documentation>
-  <XMI.model xmi.name="Samurai" href="/home/martin/public_html/samurai/tronco/doc/uml/Samurai.xmi" />
+  <XMI.model xmi.name="Samurai" href="/home/luca/public_html/samurai/doc/uml/Samurai.xmi" />
   <XMI.metamodel xmi.name="UML" href="UML.xml" xmi.version="1.3" />
  </XMI.header>
  <XMI.content>
-  <docsettings viewid="336" documentation="" uniqueid="377" />
+  <docsettings viewid="336" documentation="" uniqueid="385" />
   <umlobjects>
    <UML:Class stereotype="" package="" xmi.id="207" abstract="0" documentation="Clase para el manejo de los usuarios." name="SAMURAI_Usuario" static="0" scope="200" >
     <UML:Operation stereotype="" package="" xmi.id="216" type="void" abstract="0" documentation="Constructor.Recibe como parametro opcional el login del usuario. y busca en la base la informacion referida a el." name="SAMURAI_Usuario" static="0" scope="200" >
     <UML:Operation stereotype="" package="" xmi.id="373" type="mixed" abstract="0" documentation="Actualiza los datos de la relacion" name="modificarDb" static="0" scope="202" />
     <UML:Operation stereotype="" package="" xmi.id="374" type="mixed" abstract="0" documentation="Verifica si el login actual es valido" name="verificarLogin" static="0" scope="200" />
     <UML:Operation stereotype="" package="" xmi.id="375" type="mixed" abstract="0" documentation="Verifica si el login actual ya esta asociado en base." name="verificarAsociacionExistente" static="0" scope="200" />
-    <UML:Operation stereotype="" package="" xmi.id="377" type="mixed" abstract="0" documentation="Metodo estatico que permite asociar un usuario con un perfil en un sistema determinado." name="asociarPerfil" static="1" scope="200" >
-     <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="&amp;DB" abstract="0" documentation="Conexion a la base de datos" name="db" static="0" scope="200" />
-     <UML:Parameter stereotype="" package="" xmi.id="2" value="" type="string" abstract="0" documentation="Login del usuario" name="login" static="0" scope="200" />
-     <UML:Parameter stereotype="" package="" xmi.id="3" value="" type="int" abstract="0" documentation="Identificador del perfil a asociar" name="id_perfil" static="0" scope="200" />
-     <UML:Parameter stereotype="" package="" xmi.id="4" value="" type="int" abstract="0" documentation="Identificador del sistema en el cual se quiere realizar la asociacion" name="id_sistema" static="0" scope="200" />
-     <UML:Parameter stereotype="" package="" xmi.id="5" value="" type="string" abstract="0" documentation="Login del usuario que esta realizando los cambios" name="responsable" static="0" scope="200" />
-    </UML:Operation>
     <UML:Attribute stereotype="" package="" xmi.id="211" value="" type="string" abstract="0" documentation="Login del usuario en intranet.
 x2c: get set" name="login" static="0" scope="202" />
     <UML:Attribute stereotype="" package="" xmi.id="212" value="" type="int" abstract="0" documentation="Numero de documento del usuario
@@ -235,90 +228,160 @@ x2c:include: DB.php" name="DB" static="0" scope="200" />
    <UML:Class stereotype="" package="" xmi.id="265" abstract="0" documentation="Manejo interno de las bases de datos." name="SAMURAI_DB" static="0" scope="200" >
     <UML:Operation stereotype="" package="" xmi.id="269" type="DB" abstract="0" documentation="Realiza la conexion con la base de datos." name="connect" static="0" scope="200" />
    </UML:Class>
+   <UML:Association nameb="" stereotype="" visibilitya="200" visibilityb="200" assoctype="500" rolea="265" roleb="264" multia="" doca="" multib="" docb="" package="" xmi.id="-1" abstract="0" documentation="" name="" static="0" scope="200" changeabilitya="900" changeabilityb="900" namea="" />
+   <UML:Association nameb="" stereotype="" visibilitya="200" visibilityb="200" assoctype="501" rolea="265" roleb="210" multia="" doca="" multib="" docb="" package="" xmi.id="-1" abstract="0" documentation="" name="" static="0" scope="200" changeabilitya="900" changeabilityb="900" namea="" />
+   <UML:Association nameb="" stereotype="" visibilitya="200" visibilityb="200" assoctype="501" rolea="265" roleb="209" multia="" doca="" multib="" docb="" package="" xmi.id="-1" abstract="0" documentation="" name="" static="0" scope="200" changeabilitya="900" changeabilityb="900" namea="" />
+   <UML:Association nameb="" stereotype="" visibilitya="200" visibilityb="200" assoctype="501" rolea="265" roleb="208" multia="" doca="" multib="" docb="" package="" xmi.id="-1" abstract="0" documentation="" name="" static="0" scope="200" changeabilitya="900" changeabilityb="900" namea="" />
+   <UML:Association nameb="" stereotype="" visibilitya="200" visibilityb="200" assoctype="501" rolea="265" roleb="207" multia="" doca="" multib="" docb="" package="" xmi.id="-1" abstract="0" documentation="" name="" static="0" scope="200" changeabilitya="900" changeabilityb="900" namea="" />
+   <UML:Association nameb="" stereotype="" visibilitya="200" visibilityb="200" assoctype="500" rolea="265" roleb="264" multia="" doca="" multib="" docb="" package="" xmi.id="-1" abstract="0" documentation="" name="" static="0" scope="200" changeabilitya="900" changeabilityb="900" namea="" />
+   <UML:Class stereotype="" package="SAMURAI" xmi.id="377" abstract="0" documentation="Chequeador de permisos." name="SAMURAI_Perm" static="0" scope="200" >
+    <UML:Operation stereotype="" package="" xmi.id="380" type="void" abstract="0" documentation="Constructor." name="SAMURAI_Perm" static="0" scope="200" >
+     <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="int" abstract="0" documentation="Login del usuario para el cual obtener los permisos." name="login" static="0" scope="200" />
+     <UML:Parameter stereotype="" package="" xmi.id="2" value="" type="int" abstract="0" documentation="Sistema con el cual se va a trabajar." name="sistema" static="0" scope="200" />
+     <UML:Parameter stereotype="" package="" xmi.id="3" value="" type="&amp;DB" abstract="0" documentation="Base de datos a usar." name="db" static="0" scope="200" />
+    </UML:Operation>
+    <UML:Operation stereotype="" package="" xmi.id="381" type="bool" abstract="0" documentation="Verifica si tiene un permiso.
+
+Se puede pasar parámetros variables con un identificador de permiso o un array, por ejemplo: $perm->tiene(1, 4, array(2, 5, 67), 12); Si tiene algún permiso devuelve true.
+Si no se pasa ningún párametro ($perm->tiene()), devuelve true si tiene un permiso (al menos uno) en el sistema actual." name="tiene" static="0" scope="200" />
+    <UML:Operation stereotype="" package="" xmi.id="385" type="array" abstract="0" documentation="Obtiene una lista de permisos. Si se especifica un sistema, obtiene la lista de permisos para ese sistema." name="getPermisos" static="0" scope="200" >
+     <UML:Parameter stereotype="" package="" xmi.id="1" value="''" type="int" abstract="0" documentation="Sistema del cual obtener la lista de permisos." name="sistema" static="0" scope="200" />
+    </UML:Operation>
+    <UML:Attribute stereotype="" package="" xmi.id="378" value="array()" type="array" abstract="0" documentation="Permisos. Es un array asociativo, donde la clave es un identificador de sistema y el valor un array con los permisos que tiene para ese sistema." name="permisos" static="0" scope="202" />
+    <UML:Attribute stereotype="" package="" xmi.id="379" value="" type="int" abstract="0" documentation="Sistema usado actualmente.
+x2c:set" name="sistema" static="0" scope="202" />
+   </UML:Class>
   </umlobjects>
   <diagrams>
-   <diagram snapgrid="1" showattsig="1" fillcolor="#ffffc0" showgrid="1" showopsig="1" usefillcolor="1" snapx="10" snapy="10" showatts="1" xmi.id="206" documentation="" type="402" showops="1" showpackage="0" name="Clases y Relaciones" localid="30000" showstereotype="0" showscope="1" font="helvetica,8,-1,0,50,0,0,0,0,0" linecolor="#ff0000" >
+   <diagram snapgrid="1" showattsig="1" fillcolor="#ffffc0" zoom="100" showgrid="1" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="911" snapy="10" showatts="1" xmi.id="206" documentation="" type="402" showops="1" showpackage="0" name="Clases y Relaciones" localid="30000" showstereotype="0" showscope="1" snapcsgrid="0" font="helvetica,8,-1,0,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="603" >
     <widgets>
-     <UML:ConceptWidget usesdiagramfillcolour="0" width="173" showattsigs="601" usesdiagramusefillcolour="0" x="750" linecolour="#ff0000" y="290" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="252" usefillcolor="1" showattributes="1" xmi.id="207" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
-     <UML:ConceptWidget usesdiagramfillcolour="0" width="126" showattsigs="601" usesdiagramusefillcolour="0" x="640" linecolour="#ff0000" y="10" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="294" usefillcolor="1" showattributes="1" xmi.id="208" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
-     <UML:ConceptWidget usesdiagramfillcolour="0" width="165" showattsigs="601" usesdiagramusefillcolour="0" x="200" linecolour="#ff0000" y="10" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="630" usefillcolor="1" showattributes="1" xmi.id="209" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
-     <UML:ConceptWidget usesdiagramfillcolour="0" width="131" showattsigs="601" usesdiagramusefillcolour="0" x="480" linecolour="#ff0000" y="310" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="210" usefillcolor="1" showattributes="1" xmi.id="210" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
-     <UML:ConceptWidget usesdiagramfillcolour="0" width="46" showattsigs="601" usesdiagramusefillcolour="0" x="490" linecolour="#ff0000" y="10" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#d5d5cf" height="28" usefillcolor="1" showattributes="1" xmi.id="264" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
-     <UML:ConceptWidget usesdiagramfillcolour="0" width="86" showattsigs="601" usesdiagramusefillcolour="0" x="480" linecolour="#ff0000" y="120" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="35" usefillcolor="1" showattributes="1" xmi.id="265" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
+     <UML:ClassWidget usesdiagramfillcolour="0" width="157" showattsigs="601" usesdiagramusefillcolour="0" x="750" linecolour="#ff0000" y="290" showopsigs="600" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="221" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="207" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
+     <UML:ClassWidget usesdiagramfillcolour="0" width="111" showattsigs="601" usesdiagramusefillcolour="0" x="640" linecolour="#ff0000" y="10" showopsigs="600" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="273" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="208" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
+     <UML:ClassWidget usesdiagramfillcolour="0" width="149" showattsigs="601" usesdiagramusefillcolour="0" x="200" linecolour="#ff0000" y="10" showopsigs="600" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="585" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="209" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
+     <UML:ClassWidget usesdiagramfillcolour="0" width="118" showattsigs="601" usesdiagramusefillcolour="0" x="480" linecolour="#ff0000" y="310" showopsigs="600" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="195" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="210" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
+     <UML:ClassWidget usesdiagramfillcolour="0" width="35" showattsigs="601" usesdiagramusefillcolour="0" x="490" linecolour="#ff0000" y="10" showopsigs="600" instancename="" usesdiagramlinecolour="0" fillcolour="#d5d5cf" height="25" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="264" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
+     <UML:ClassWidget usesdiagramfillcolour="0" width="79" showattsigs="601" usesdiagramusefillcolour="0" x="480" linecolour="#ff0000" y="120" showopsigs="600" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="32" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="265" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
     </widgets>
     <messages/>
     <associations>
-     <UML:AssocWidget totalcounta="3" indexa="1" totalcountb="2" indexb="1" widgetbid="264" widgetaid="265" documentation="" type="500" >
+     <UML:AssocWidget totalcounta="3" indexa="1" visibilityB="200" totalcountb="2" indexb="1" widgetbid="264" roleBdoc="" widgetaid="265" roleAdoc="" documentation="" type="500" changeabilityA="900" changeabilityB="900" visibilityA="200" >
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="703" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="711" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="712" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
       <linepath>
-       <startpoint startx="508" starty="120" />
-       <endpoint endx="513" endy="38" />
+       <startpoint startx="506" starty="120" />
+       <endpoint endx="507" endy="35" />
       </linepath>
      </UML:AssocWidget>
-     <UML:AssocWidget totalcounta="3" indexa="1" totalcountb="2" indexb="1" widgetbid="210" widgetaid="265" documentation="" type="501" >
+     <UML:AssocWidget totalcounta="3" indexa="1" visibilityB="200" totalcountb="2" indexb="1" widgetbid="210" roleBdoc="" widgetaid="265" roleAdoc="" documentation="" type="501" changeabilityA="900" changeabilityB="900" visibilityA="200" >
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="703" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="701" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="702" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="709" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="+" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="710" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="+" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="711" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="712" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
       <linepath>
-       <startpoint startx="508" starty="155" />
-       <endpoint endx="545" endy="310" />
+       <startpoint startx="506" starty="152" />
+       <endpoint endx="539" endy="310" />
       </linepath>
      </UML:AssocWidget>
-     <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="209" widgetaid="265" documentation="" type="501" >
+     <UML:AssocWidget totalcounta="2" indexa="1" visibilityB="200" totalcountb="2" indexb="1" widgetbid="209" roleBdoc="" widgetaid="265" roleAdoc="" documentation="" type="501" changeabilityA="900" changeabilityB="900" visibilityA="200" >
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="703" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="701" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="702" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="709" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="+" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="710" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="+" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="711" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="712" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
       <linepath>
-       <startpoint startx="480" starty="137" />
-       <endpoint endx="365" endy="325" />
+       <startpoint startx="480" starty="136" />
+       <endpoint endx="349" endy="302" />
       </linepath>
      </UML:AssocWidget>
-     <UML:AssocWidget totalcounta="3" indexa="2" totalcountb="2" indexb="1" widgetbid="208" widgetaid="265" documentation="" type="501" >
+     <UML:AssocWidget totalcounta="3" indexa="2" visibilityB="200" totalcountb="2" indexb="1" widgetbid="208" roleBdoc="" widgetaid="265" roleAdoc="" documentation="" type="501" changeabilityA="900" changeabilityB="900" visibilityA="200" >
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="703" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="701" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="702" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="709" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="+" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="710" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="+" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="711" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="712" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
       <linepath>
-       <startpoint startx="537" starty="120" />
-       <endpoint endx="640" endy="157" />
+       <startpoint startx="532" starty="120" />
+       <endpoint endx="640" endy="146" />
       </linepath>
      </UML:AssocWidget>
-     <UML:AssocWidget totalcounta="3" indexa="2" totalcountb="2" indexb="1" widgetbid="207" widgetaid="265" documentation="" type="501" >
+     <UML:AssocWidget totalcounta="3" indexa="2" visibilityB="200" totalcountb="2" indexb="1" widgetbid="207" roleBdoc="" widgetaid="265" roleAdoc="" documentation="" type="501" changeabilityA="900" changeabilityB="900" visibilityA="200" >
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="703" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="701" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="702" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="709" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="+" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="710" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="+" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="711" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="712" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
       <linepath>
-       <startpoint startx="537" starty="155" />
-       <endpoint endx="750" endy="416" />
+       <startpoint startx="532" starty="152" />
+       <endpoint endx="750" endy="400" />
       </linepath>
      </UML:AssocWidget>
     </associations>
    </diagram>
-   <diagram snapgrid="1" showattsig="1" fillcolor="#ffffc0" showgrid="1" showopsig="1" usefillcolor="1" snapx="10" snapy="10" showatts="1" xmi.id="336" documentation="" type="402" showops="1" showpackage="0" name="Clases" localid="30000" showstereotype="0" showscope="1" font="helvetica,8,-1,0,50,0,0,0,0,0" linecolor="#ff0000" >
+   <diagram snapgrid="1" showattsig="1" fillcolor="#ffffc0" zoom="100" showgrid="1" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="829" snapy="10" showatts="1" xmi.id="336" documentation="" type="402" showops="1" showpackage="0" name="Clases" localid="30000" showstereotype="0" showscope="1" snapcsgrid="0" font="helvetica,8,-1,0,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="1129" >
     <widgets>
-     <UML:ConceptWidget usesdiagramfillcolour="0" width="46" showattsigs="601" usesdiagramusefillcolour="0" x="610" linecolour="#ff0000" y="20" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#d5d5cf" height="28" usefillcolor="1" showattributes="1" xmi.id="264" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
-     <UML:ConceptWidget usesdiagramfillcolour="0" width="469" showattsigs="601" usesdiagramusefillcolour="0" x="10" linecolour="#ff0000" y="240" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="294" usefillcolor="1" showattributes="1" xmi.id="208" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
-     <UML:ConceptWidget usesdiagramfillcolour="0" width="396" showattsigs="601" usesdiagramusefillcolour="0" x="10" linecolour="#ff0000" y="10" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="210" usefillcolor="1" showattributes="1" xmi.id="210" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
-     <UML:ConceptWidget usesdiagramfillcolour="0" width="95" showattsigs="601" usesdiagramusefillcolour="0" x="590" linecolour="#ff0000" y="80" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="35" usefillcolor="1" showattributes="1" xmi.id="265" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
-     <UML:ConceptWidget usesdiagramfillcolour="0" width="473" showattsigs="601" usesdiagramusefillcolour="0" x="10" linecolour="#ff0000" y="540" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="630" usefillcolor="1" showattributes="1" xmi.id="209" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
-     <UML:ConceptWidget usesdiagramfillcolour="0" width="501" showattsigs="601" usesdiagramusefillcolour="0" x="590" linecolour="#ff0000" y="130" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="252" usefillcolor="1" showattributes="1" xmi.id="207" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
+     <UML:ClassWidget usesdiagramfillcolour="0" width="35" showattsigs="601" usesdiagramusefillcolour="0" x="470" linecolour="#ff0000" y="20" showopsigs="601" instancename="" usesdiagramlinecolour="0" fillcolour="#d5d5cf" height="25" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="264" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
+     <UML:ClassWidget usesdiagramfillcolour="0" width="430" showattsigs="601" usesdiagramusefillcolour="0" x="10" linecolour="#ff0000" y="240" showopsigs="601" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="273" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="208" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
+     <UML:ClassWidget usesdiagramfillcolour="0" width="361" showattsigs="601" usesdiagramusefillcolour="0" x="10" linecolour="#ff0000" y="10" showopsigs="601" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="195" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="210" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
+     <UML:ClassWidget usesdiagramfillcolour="0" width="88" showattsigs="601" usesdiagramusefillcolour="0" x="450" linecolour="#ff0000" y="80" showopsigs="601" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="32" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="265" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
+     <UML:ClassWidget usesdiagramfillcolour="0" width="431" showattsigs="601" usesdiagramusefillcolour="0" x="10" linecolour="#ff0000" y="540" showopsigs="601" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="585" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="209" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
+     <UML:ClassWidget usesdiagramfillcolour="0" width="375" showattsigs="601" usesdiagramusefillcolour="0" x="450" linecolour="#ff0000" y="130" showopsigs="601" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="221" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="207" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
+     <UML:ClassWidget usesdiagramfillcolour="0" width="288" showattsigs="601" usesdiagramusefillcolour="0" x="450" linecolour="#ff0000" y="370" showopsigs="601" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="78" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="377" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
     </widgets>
     <messages/>
     <associations>
-     <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="264" widgetaid="265" documentation="" type="500" >
+     <UML:AssocWidget totalcounta="2" indexa="1" visibilityB="200" totalcountb="2" indexb="1" widgetbid="264" roleBdoc="" widgetaid="265" roleAdoc="" documentation="" type="500" changeabilityA="900" changeabilityB="900" visibilityA="200" >
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="703" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="711" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="712" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
       <linepath>
-       <startpoint startx="637" starty="80" />
-       <endpoint endx="633" endy="48" />
+       <startpoint startx="494" starty="80" />
+       <endpoint endx="487" endy="45" />
       </linepath>
      </UML:AssocWidget>
     </associations>
    </diagram>
   </diagrams>
   <listview>
-   <listitem open="1" type="800" id="-1" label="Views" >
-    <listitem open="1" type="801" id="-1" label="Logical View" >
-     <listitem open="0" type="803" id="-1" label="Diagramas" >
+   <listitem open="1" type="800" id="-1" label="Vistas" >
+    <listitem open="1" type="801" id="-1" label="Vista lógica" >
+     <listitem open="1" type="803" id="-1" label="Diagramas" >
       <listitem open="1" type="807" id="336" label="Clases" />
       <listitem open="1" type="807" id="206" label="Clases y Relaciones" />
+      <listitem open="1" type="813" id="377" label="SAMURAI_Perm" >
+       <listitem open="0" type="814" id="378" label="permisos" />
+       <listitem open="0" type="814" id="379" label="sistema" />
+       <listitem open="0" type="815" id="380" label="SAMURAI_Perm" />
+       <listitem open="0" type="815" id="385" label="getPermisos" />
+       <listitem open="0" type="815" id="381" label="tiene" />
+      </listitem>
      </listitem>
      <listitem open="0" type="803" id="-1" label="EXTERNO" >
       <listitem open="1" type="813" id="264" label="DB" />
      </listitem>
-     <listitem open="1" type="803" id="-1" label="SAMURAI" >
+     <listitem open="0" type="803" id="-1" label="SAMURAI" >
       <listitem open="0" type="813" id="265" label="SAMURAI_DB" >
        <listitem open="0" type="815" id="269" label="connect" />
       </listitem>
       <listitem open="0" type="813" id="208" label="SAMURAI_Perfil" >
-       <listitem open="0" type="815" id="325" label="borrarDb" />
-       <listitem open="0" type="815" id="363" label="borrarPermisos" />
        <listitem open="0" type="814" id="271" label="db" />
        <listitem open="0" type="814" id="226" label="descripcion" />
+       <listitem open="0" type="814" id="225" label="id" />
+       <listitem open="0" type="814" id="361" label="permisos" />
+       <listitem open="0" type="814" id="330" label="responsable" />
+       <listitem open="0" type="814" id="227" label="tipo" />
+       <listitem open="0" type="815" id="229" label="SAMURAI_Perfil" />
+       <listitem open="0" type="815" id="325" label="borrarDb" />
+       <listitem open="0" type="815" id="363" label="borrarPermisos" />
        <listitem open="0" type="815" id="360" label="existeAsociacion" />
        <listitem open="0" type="815" id="358" label="existePerfil" />
        <listitem open="0" type="815" id="356" label="getArrayPerfiles" />
@@ -327,43 +390,43 @@ x2c:include: DB.php" name="DB" static="0" scope="200" />
        <listitem open="0" type="815" id="324" label="grabarDb" />
        <listitem open="0" type="815" id="323" label="guardarDatos" />
        <listitem open="0" type="815" id="362" label="guardarPermisos" />
-       <listitem open="0" type="814" id="225" label="id" />
        <listitem open="0" type="815" id="326" label="modificarDb" />
        <listitem open="0" type="815" id="322" label="obtenerDatosDb" />
-       <listitem open="0" type="814" id="361" label="permisos" />
-       <listitem open="0" type="814" id="330" label="responsable" />
-       <listitem open="0" type="815" id="229" label="SAMURAI_Perfil" />
-       <listitem open="0" type="814" id="227" label="tipo" />
        <listitem open="0" type="815" id="376" label="verifPermisos" />
       </listitem>
       <listitem open="0" type="813" id="210" label="SAMURAI_Permiso" >
-       <listitem open="0" type="815" id="364" label="asociadoASistema" />
-       <listitem open="0" type="815" id="318" label="borrarDb" />
        <listitem open="0" type="814" id="270" label="db" />
        <listitem open="0" type="814" id="258" label="descripcion" />
+       <listitem open="0" type="814" id="257" label="id" />
+       <listitem open="0" type="814" id="296" label="responsable" />
+       <listitem open="0" type="815" id="259" label="SAMURAI_Permiso" />
+       <listitem open="0" type="815" id="364" label="asociadoASistema" />
+       <listitem open="0" type="815" id="318" label="borrarDb" />
        <listitem open="0" type="815" id="333" label="getArrayPermisos" />
        <listitem open="0" type="815" id="332" label="getIdPermisos" />
        <listitem open="0" type="815" id="334" label="getPermisos" />
        <listitem open="0" type="815" id="317" label="grabarDb" />
        <listitem open="0" type="815" id="316" label="guardarDatos" />
-       <listitem open="0" type="814" id="257" label="id" />
        <listitem open="0" type="815" id="319" label="modificarDb" />
        <listitem open="0" type="815" id="295" label="obtenerDatosDb" />
-       <listitem open="0" type="814" id="296" label="responsable" />
-       <listitem open="0" type="815" id="259" label="SAMURAI_Permiso" />
       </listitem>
       <listitem open="0" type="813" id="209" label="SAMURAI_Sistema" >
        <listitem open="0" type="814" id="310" label="asociaciones" />
-       <listitem open="0" type="815" id="305" label="borrarDb" />
-       <listitem open="0" type="815" id="309" label="borrarPermisosDb" />
        <listitem open="0" type="814" id="242" label="contacto" />
        <listitem open="0" type="814" id="272" label="db" />
        <listitem open="0" type="814" id="238" label="descripcion" />
-       <listitem open="0" type="815" id="313" label="eliminarAsociacion" />
-       <listitem open="0" type="815" id="315" label="existeAsociacion" />
        <listitem open="0" type="814" id="240" label="fecha_fin" />
        <listitem open="0" type="814" id="241" label="fecha_implementacion" />
        <listitem open="0" type="814" id="239" label="fecha_inicio" />
+       <listitem open="0" type="814" id="235" label="id" />
+       <listitem open="0" type="814" id="237" label="nombre" />
+       <listitem open="0" type="814" id="300" label="permisos" />
+       <listitem open="0" type="814" id="289" label="responsable" />
+       <listitem open="0" type="815" id="243" label="SAMURAI_Sistema" />
+       <listitem open="0" type="815" id="305" label="borrarDb" />
+       <listitem open="0" type="815" id="309" label="borrarPermisosDb" />
+       <listitem open="0" type="815" id="313" label="eliminarAsociacion" />
+       <listitem open="0" type="815" id="315" label="existeAsociacion" />
        <listitem open="0" type="815" id="343" label="getArraySistemas" />
        <listitem open="0" type="815" id="250" label="getContacto" />
        <listitem open="0" type="815" id="246" label="getDescripcion" />
@@ -381,14 +444,9 @@ x2c:include: DB.php" name="DB" static="0" scope="200" />
        <listitem open="0" type="815" id="308" label="grabarPermisosDb" />
        <listitem open="0" type="815" id="312" label="guardarAsociacion" />
        <listitem open="0" type="815" id="288" label="guardarDatos" />
-       <listitem open="0" type="814" id="235" label="id" />
        <listitem open="0" type="815" id="314" label="modificarAsociacion" />
        <listitem open="0" type="815" id="306" label="modificarDb" />
-       <listitem open="0" type="814" id="237" label="nombre" />
        <listitem open="0" type="815" id="263" label="obtenerDatosDb" />
-       <listitem open="0" type="814" id="300" label="permisos" />
-       <listitem open="0" type="814" id="289" label="responsable" />
-       <listitem open="0" type="815" id="243" label="SAMURAI_Sistema" />
        <listitem open="0" type="815" id="256" label="setContacto" />
        <listitem open="0" type="815" id="252" label="setDescripcion" />
        <listitem open="0" type="815" id="254" label="setFechaFin" />
@@ -399,27 +457,29 @@ x2c:include: DB.php" name="DB" static="0" scope="200" />
        <listitem open="0" type="815" id="291" label="setResponsable" />
       </listitem>
       <listitem open="0" type="813" id="207" label="SAMURAI_Usuario" >
-       <listitem open="0" type="815" id="377" label="asociarPerfil" />
-       <listitem open="0" type="815" id="372" label="borrarDb" />
        <listitem open="0" type="814" id="273" label="db" />
+       <listitem open="0" type="814" id="211" label="login" />
+       <listitem open="0" type="814" id="213" label="nombre" />
+       <listitem open="0" type="814" id="212" label="nrodoc" />
+       <listitem open="0" type="814" id="369" label="perfiles" />
+       <listitem open="0" type="815" id="216" label="SAMURAI_Usuario" />
+       <listitem open="0" type="815" id="372" label="borrarDb" />
        <listitem open="0" type="815" id="366" label="getArrayUsuarios" />
        <listitem open="0" type="815" id="365" label="getLoginUsuarios" />
        <listitem open="0" type="815" id="367" label="getUsuarios" />
        <listitem open="0" type="815" id="371" label="grabarDb" />
        <listitem open="0" type="815" id="370" label="guardarDatos" />
-       <listitem open="0" type="814" id="211" label="login" />
        <listitem open="0" type="815" id="373" label="modificarDb" />
-       <listitem open="0" type="814" id="213" label="nombre" />
-       <listitem open="0" type="814" id="212" label="nrodoc" />
        <listitem open="0" type="815" id="368" label="obtenerDatosDb" />
-       <listitem open="0" type="814" id="369" label="perfiles" />
-       <listitem open="0" type="815" id="216" label="SAMURAI_Usuario" />
        <listitem open="0" type="815" id="375" label="verificarAsociacionExistente" />
        <listitem open="0" type="815" id="374" label="verificarLogin" />
       </listitem>
      </listitem>
     </listitem>
-    <listitem open="0" type="802" id="-1" label="Use Case View" />
+    <listitem open="0" type="802" id="-1" label="Vista de caso de uso" />
+    <listitem open="1" type="821" id="-1" label="Component View" />
+    <listitem open="0" type="823" id="-1" label="Diagrams" />
+    <listitem open="1" type="827" id="-1" label="Deployment View" />
    </listitem>
   </listview>
  </XMI.content>
diff --git a/lib/SAMURAI/Perm.php b/lib/SAMURAI/Perm.php
new file mode 100644 (file)
index 0000000..de949de
--- /dev/null
@@ -0,0 +1,141 @@
+<?php
+// vim: set binary expandtab tabstop=4 shiftwidth=4:
+// +--------------------------------------------------------------------+
+// |                      Ministerio de Economía                        |
+// |                             SAMURAI                                |
+// +--------------------------------------------------------------------+
+// | This file is part of SAMURAI.                                      |
+// |                                                                    |
+// | SAMURAI is free software; you can redistribute it and/or modify    |
+// | it under the terms of the GNU General Public License as published  |
+// | by the Free Software Foundation; either version 2 of the License,  |
+// | or (at your option) any later version.                             |
+// |                                                                    |
+// | SAMURAI is distributed in the hope that it will be useful, but     |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of         |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU   |
+// | General Public License for more details.                           |
+// |                                                                    |
+// | You should have received a copy of the GNU General Public License  |
+// | along with SAMURAI; if not, write to the Free Software Foundation, |
+// | Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA      |
+// +--------------------------------------------------------------------+
+// | Creado: Fri Jul 18 16:05:22 2003                                   |
+// | Autor:  Leandro Lucarella <llucar@mecon.gov.ar>                    |
+// +--------------------------------------------------------------------+
+//
+// $Id$
+//
+
+// +X2C Class 377 :SAMURAI_Perm
+/**
+ * Chequeador de permisos.
+ *
+ * @package SAMURAI
+ * @access public
+ */
+class SAMURAI_Perm {
+    /**
+     * Permisos. Es un array asociativo, donde la clave es un identificador de sistema y el valor un array con los permisos que tiene para ese sistema.
+     *
+     * @var    array $permisos
+     * @access protected
+     */
+    var $_permisos = array();
+
+    /**
+     * Sistema usado actualmente.
+     *
+     * @var    int $sistema
+     * @access protected
+     */
+    var $_sistema;
+
+    /**
+     * Sets Sistema.
+     *
+     * @param  int $sistema Sistema.
+     *
+     * @return void
+     * @access public
+     */
+    function setSistema($sistema)
+    {
+        $this->_sistema = $sistema;
+    }
+
+    // ~X2C
+
+    // +X2C Operation 380
+    /**
+     * Constructor.
+     *
+     * @param  int $login Login del usuario para el cual obtener los permisos.
+     * @param  int $sistema Sistema con el cual se va a trabajar.
+     * @param  DB &$db Base de datos a usar.
+     *
+     * @return void
+     * @access public
+     */
+    function SAMURAI_Perm($login, $sistema, &$db) // ~X2C
+    {
+        $this->_sistema = $sistema;
+        $query = '
+            SELECT DISTINCT psu.id_sistema AS sistema, pps.id_permiso AS permiso
+            FROM samurai.perfil_sist_usuario AS psu, samurai.perm_perfil_sist AS pps
+            WHERE psu.login = '.$db->quote($login).' AND psu.id_perfil = pps.id_perfil;';
+        foreach ($db->getAll($query, DB_FETCHMODE_ASSOC) as $row) {
+            $this->_permisos[$row['sistema']][] = $row['permiso'];
+        }
+    }
+    // -X2C
+
+    // +X2C Operation 381
+    /**
+     * Verifica si tiene un permiso. Se puede pasar par?etros variables, por ejemplo: $perm->tiene(1, 4, 9, 12); Si tiene algn permiso devuelve true. Si no se pasa ningn p?ametro ($perm->tiene()), devuelve true si tiene un permiso (al menos uno) en el sistema actual.
+     *
+     * @return bool
+     * @access public
+     */
+    function tiene() // ~X2C
+    {
+        $args = func_get_args();
+        if (!$args) {
+            return (boolean) @$this->_permisos[$this->_sistema];
+        } else {
+            foreach ($args as $arg) {
+                if (is_array($arg)) {
+                     if (array_intersect($arg, @$this->_permisos[$this->_sistema])) {
+                        return true;
+                     }
+                } else {
+                     if (in_array($arg, @$this->_permisos[$this->_sistema])) {
+                        return true;
+                     }
+                }
+            }
+            return false;
+        }
+    }
+    // -X2C
+
+
+    // +X2C Operation 385
+    /**
+     * Obtiene una lista de permisos. Si se especifica un sistema, obtiene la lista de permisos para ese sistema.
+     *
+     * @param  int $sistema Sistema del cual obtener la lista de permisos.
+     *
+     * @return array
+     * @access public
+     */
+    function getPermisos($sistema = '') // ~X2C
+    {
+        $sistema = $sistema ? $sistema : $this->_sistema;
+        return @$this->_permisos[$sistema] ? $this->_permisos[$sistema] : array();
+    }
+    // -X2C
+
+} // -X2C Class :SAMURAI_Perm
+
+?>
\ No newline at end of file