
 
 p a c k a g e   u s e r   / /   i m p o r t   " i m u s l a b . c o m / a r o z _ o n l i n e / m o d / u s e r " 
 
 
 
 
 
 T Y P E S 
 
 
 
 t y p e   U s e r   s t r u c t   { 
 
 	 U s e r n a m e                 s t r i n g 
 
 	 S t o r a g e Q u o t a         * q u o t a . Q u o t a H a n d l e r 
 
 	 P e r m i s s i o n G r o u p   [ ] * p e r m i s s i o n . P e r m i s s i o n G r o u p 
 
 	 H o m e D i r e c t o r i e s   * s t o r a g e . S t o r a g e P o o l 
 
 
 
 	 / /   H a s   u n e x p o r t e d   f i e l d s . 
 
 } 
 
 
 
 f u n c   ( u   * U s e r )   C a n R e a d ( v p a t h   s t r i n g )   b o o l 
 
         H e l p e r   f u n c t i o n   f o r   c h e c k i n g   p e r m i s s i o n 
 
 
 
 f u n c   ( u   * U s e r )   C a n W r i t e ( v p a t h   s t r i n g )   b o o l 
 
 
 
 f u n c   ( u   * U s e r )   G e t A l l F i l e S y s t e m H a n d l e r ( )   [ ] * f s . F i l e S y s t e m H a n d l e r 
 
 
 
 f u n c   ( u   * U s e r )   G e t F i l e S y s t e m H a n d l e r F r o m R e a l P a t h ( r p a t h   s t r i n g )   ( * f s . F i l e S y s t e m H a n d l e r ,   e r r o r ) 
 
 
 
 f u n c   ( u   * U s e r )   G e t F i l e S y s t e m H a n d l e r F r o m V i r t u a l P a t h ( v p a t h   s t r i n g )   ( * f s . F i l e S y s t e m H a n d l e r ,   e r r o r ) 
 
         G e t   a   f i l e   s y s t e m   h a n d l e r   f r o m   a   v i r t u a l   p a t h ,   t h i s   f i l e   s y s t e m   h a n d l e r 
 
         m i g h t   n o t   b e   t h e   h i g h e s t   p r i o i t y   o n e 
 
 
 
 f u n c   ( u   * U s e r )   G e t H i g h e s t A c c e s s R i g h t S t o r a g e P o o l ( f s U U I D   s t r i n g )   ( * s t o r a g e . S t o r a g e P o o l ,   e r r o r ) 
 
         G e t   t h e   h i g h e s t   a c c e s s   r i g h t   t o   t h e   g i v e n   f s   u u i d 
 
 
 
 f u n c   ( u   * U s e r )   G e t H o m e D i r e c t o r y ( )   ( s t r i n g ,   e r r o r ) 
 
 
 
 f u n c   ( u   * U s e r )   G e t I n t e r f a c e M o d u l e s ( )   [ ] s t r i n g 
 
         G e t   t h e   ( o r   a   l i s t   o f   )   I n t e r f a c e   M o d u l e   ( a k a   b o o t i n g   m o d u l e )   f o r   t h i s   u s e r , 
 
         r e t u r n i n g   m o d u l e   u u i d s 
 
 
 
 f u n c   ( u   * U s e r )   G e t M o d u l e A c c e s s P e r m i s s i o n ( m o d u l e N a m e   s t r i n g )   b o o l 
 
         P e r m i s s i o n s   r e l a t e d   t o   m o d u l e s 
 
 
 
 f u n c   ( u   * U s e r )   G e t P a t h A c c e s s P e r m i s s i o n ( v p a t h   s t r i n g )   s t r i n g 
 
         C h e c k   i f   t h e   u s e r   h a s   a c c e s s   t o   t h i s   v i r t h a l   f i l e p a t h 
 
 
 
 f u n c   ( u   * U s e r )   G e t U s e r I c o n ( )   s t r i n g 
 
         G e t   t h e   c u r r e n t   u s e r   i c o n 
 
 
 
 f u n c   ( u   * U s e r )   G e t U s e r P e r m i s s i o n G r o u p ( )   [ ] * p e r m i s s i o n . P e r m i s s i o n G r o u p 
 
 
 
 f u n c   ( u   * U s e r )   H a v e S p a c e F o r ( r e a l p a t h   s t r i n g )   b o o l 
 
         R e t u r n   t h e   u s e r   q u o t a   i n f o r m a t i o n ,   r e t u r n i n g   u s e d   /   t o t a l 
 
 
 
 f u n c   ( u   * U s e r )   I s A d m i n ( )   b o o l 
 
 
 
 f u n c   ( u   * U s e r )   R e a l P a t h T o V i r t u a l P a t h ( r p a t h   s t r i n g )   ( s t r i n g ,   e r r o r ) 
 
 
 
 f u n c   ( u   * U s e r )   R e m o v e O w n e r s h i p F r o m F i l e ( r e a l p a t h   s t r i n g )   e r r o r 
 
 
 
 f u n c   ( u   * U s e r )   R e m o v e U s e r ( ) 
 
         R e m o v e   t h e   c u r r e n t   u s e r 
 
 
 
 f u n c   ( u   * U s e r )   S e t O w n e r O f F i l e ( r e a l p a t h   s t r i n g )   e r r o r 
 
 
 
 f u n c   ( u   * U s e r )   S e t U s e r I c o n ( b a s e 6 4 d a t a   s t r i n g ) 
 
         S e t   t h e   c u r r e n t   u s e r   i c o n 
 
 
 
 f u n c   ( u   * U s e r )   S e t U s e r P e r m i s s i o n G r o u p ( g r o u p s   [ ] * p e r m i s s i o n . P e r m i s s i o n G r o u p ) 
 
 
 
 f u n c   ( u   * U s e r )   V i r t u a l P a t h T o R e a l P a t h ( v p a t h   s t r i n g )   ( s t r i n g ,   e r r o r ) 
 
 
 
 t y p e   U s e r H a n d l e r   s t r u c t   { 
 
 	 / /   H a s   u n e x p o r t e d   f i e l d s . 
 
 } 
 
 
 
 f u n c   N e w U s e r H a n d l e r ( s y s t e m d b   * d b . D a t a b a s e ,   a u t h A g e n t   * a u t h . A u t h A g e n t ,   p e r m i s s i o n H a n d l e r   * p e r m i s s i o n . P e r m i s s i o n H a n d l e r ,   b a s e S t o r a g e P o o l   * s t o r a g e . S t o r a g e P o o l )   ( * U s e r H a n d l e r ,   e r r o r ) 
 
         I n i t i a t e   a   n e w   u s e r   h a n d l e r 
 
 
 
 f u n c   ( u   * U s e r H a n d l e r )   G e t A u t h A g e n t ( )   * a u t h . A u t h A g e n t 
 
         R e t u r n   t h e   u s e r   h a n d l e r ' s   a u t h   a g e n t 
 
 
 
 f u n c   ( u   * U s e r H a n d l e r )   G e t D a t a b a s e ( )   * d b . D a t a b a s e 
 
 
 
 f u n c   ( u   * U s e r H a n d l e r )   G e t P e r m i s s i o n H a n d l e r ( )   * p e r m i s s i o n . P e r m i s s i o n H a n d l e r 
 
 
 
 f u n c   ( u   * U s e r H a n d l e r )   G e t S t o r a g e P o o l ( )   * s t o r a g e . S t o r a g e P o o l 
 
 
 
 f u n c   ( u   * U s e r H a n d l e r )   G e t U s e r I n f o F r o m R e q u e s t ( w   h t t p . R e s p o n s e W r i t e r ,   r   * h t t p . R e q u e s t )   ( * U s e r ,   e r r o r ) 
 
         G e t   u s e r   o b e j c t   f r o m   s e s s i o n 
 
 
 
 f u n c   ( u   * U s e r H a n d l e r )   G e t U s e r I n f o F r o m U s e r n a m e ( u s e r n a m e   s t r i n g )   ( * U s e r ,   e r r o r ) 
 
         G e t   U s e r   o b j e c t   f r o m   u s e r n a m e 
 
 
 
 