@ -149,6 +149,91 @@ Feature: transfer-ownership
| u i d _ f i l e _ o w n e r | t e s t |
| s h a r e _ w i t h | t e s t |
Scenario : transferring ownership of folder reshared with another user
Given u s e r " u s e r 0 " e x i s t s
And u s e r " u s e r 1 " e x i s t s
And u s e r " u s e r 2 " e x i s t s
And u s e r " u s e r 3 " e x i s t s
And U s e r " u s e r 3 " c r e a t e d a f o l d e r " / t e s t "
And U s e r " u s e r 3 " u p l o a d s f i l e " d a t a / t e x t f i l e . t x t " t o " / t e s t / s o m e f i l e . t x t "
And f o l d e r " / t e s t " o f u s e r " u s e r 3 " i s s h a r e d w i t h u s e r " u s e r 0 " w i t h p e r m i s s i o n s 31
And u s e r " u s e r 0 " a c c e p t s l a s t s h a r e
And f o l d e r " / t e s t " o f u s e r " u s e r 0 " i s s h a r e d w i t h u s e r " u s e r 2 " w i t h p e r m i s s i o n s 31
And u s e r " u s e r 2 " a c c e p t s l a s t s h a r e
When t r a n s f e r r i n g o w n e r s h i p f r o m " u s e r 0 " t o " u s e r 1 "
And t h e c o m m a n d w a s s u c c e s s f u l
And A s a n " u s e r 2 "
Then D o w n l o a d e d c o n t e n t w h e n d o w n l o a d i n g f i l e " / t e s t / s o m e f i l e . t x t " w i t h r a n g e " b y t e s = 0 - 6 " s h o u l d b e " T h i s i s "
And u s i n g o l d d a v p a t h
And a s " u s e r 0 " t h e f o l d e r " / t e s t " e x i s t s
And u s i n g r e c e i v e d t r a n s f e r f o l d e r o f " u s e r 1 " a s d a v p a t h
And a s " u s e r 1 " t h e f o l d e r " / t e s t " d o e s n o t e x i s t
And A s a n " u s e r 0 "
And G e t t i n g i n f o o f l a s t s h a r e
And t h e O C S s t a t u s c o d e s h o u l d b e " 1 0 0 "
And S h a r e f i e l d s o f l a s t s h a r e m a t c h w i t h
| u i d _ o w n e r | u s e r 0 |
| u i d _ f i l e _ o w n e r | u s e r 3 |
| s h a r e _ w i t h | u s e r 2 |
Scenario : transferring ownership of folder reshared with group to a user in the group
Given u s e r " u s e r 0 " e x i s t s
And u s e r " u s e r 1 " e x i s t s
And u s e r " u s e r 2 " e x i s t s
And u s e r " u s e r 3 " e x i s t s
And g r o u p " g r o u p 1 " e x i s t s
And u s e r " u s e r 1 " b e l o n g s t o g r o u p " g r o u p 1 "
And U s e r " u s e r 3 " c r e a t e d a f o l d e r " / t e s t "
And U s e r " u s e r 3 " u p l o a d s f i l e " d a t a / t e x t f i l e . t x t " t o " / t e s t / s o m e f i l e . t x t "
And f o l d e r " / t e s t " o f u s e r " u s e r 3 " i s s h a r e d w i t h u s e r " u s e r 0 " w i t h p e r m i s s i o n s 31
And u s e r " u s e r 0 " a c c e p t s l a s t s h a r e
And f o l d e r " / t e s t " o f u s e r " u s e r 0 " i s s h a r e d w i t h g r o u p " g r o u p 1 " w i t h p e r m i s s i o n s 31
And u s e r " u s e r 1 " a c c e p t s l a s t s h a r e
When t r a n s f e r r i n g o w n e r s h i p f r o m " u s e r 0 " t o " u s e r 1 "
And t h e c o m m a n d w a s s u c c e s s f u l
And A s a n " u s e r 1 "
Then D o w n l o a d e d c o n t e n t w h e n d o w n l o a d i n g f i l e " / t e s t / s o m e f i l e . t x t " w i t h r a n g e " b y t e s = 0 - 6 " s h o u l d b e " T h i s i s "
And u s i n g o l d d a v p a t h
And a s " u s e r 0 " t h e f o l d e r " / t e s t " e x i s t s
And u s i n g r e c e i v e d t r a n s f e r f o l d e r o f " u s e r 1 " a s d a v p a t h
And a s " u s e r 1 " t h e f o l d e r " / t e s t " d o e s n o t e x i s t
And A s a n " u s e r 1 "
And G e t t i n g i n f o o f l a s t s h a r e
And t h e O C S s t a t u s c o d e s h o u l d b e " 1 0 0 "
And S h a r e f i e l d s o f l a s t s h a r e m a t c h w i t h
| u i d _ o w n e r | u s e r 1 |
| u i d _ f i l e _ o w n e r | u s e r 3 |
| s h a r e _ w i t h | g r o u p 1 |
Scenario : transferring ownership of folder reshared with group to a user not in the group
Given u s e r " u s e r 0 " e x i s t s
And u s e r " u s e r 1 " e x i s t s
And u s e r " u s e r 2 " e x i s t s
And u s e r " u s e r 3 " e x i s t s
And g r o u p " g r o u p 1 " e x i s t s
And u s e r " u s e r 2 " b e l o n g s t o g r o u p " g r o u p 1 "
And U s e r " u s e r 3 " c r e a t e d a f o l d e r " / t e s t "
And U s e r " u s e r 3 " u p l o a d s f i l e " d a t a / t e x t f i l e . t x t " t o " / t e s t / s o m e f i l e . t x t "
And f o l d e r " / t e s t " o f u s e r " u s e r 3 " i s s h a r e d w i t h u s e r " u s e r 0 " w i t h p e r m i s s i o n s 31
And u s e r " u s e r 0 " a c c e p t s l a s t s h a r e
And f o l d e r " / t e s t " o f u s e r " u s e r 0 " i s s h a r e d w i t h g r o u p " g r o u p 1 " w i t h p e r m i s s i o n s 31
And u s e r " u s e r 2 " a c c e p t s l a s t s h a r e
When t r a n s f e r r i n g o w n e r s h i p f r o m " u s e r 0 " t o " u s e r 1 "
And t h e c o m m a n d w a s s u c c e s s f u l
And A s a n " u s e r 2 "
Then D o w n l o a d e d c o n t e n t w h e n d o w n l o a d i n g f i l e " / t e s t / s o m e f i l e . t x t " w i t h r a n g e " b y t e s = 0 - 6 " s h o u l d b e " T h i s i s "
And u s i n g o l d d a v p a t h
And a s " u s e r 0 " t h e f o l d e r " / t e s t " e x i s t s
And u s i n g r e c e i v e d t r a n s f e r f o l d e r o f " u s e r 1 " a s d a v p a t h
And a s " u s e r 1 " t h e f o l d e r " / t e s t " d o e s n o t e x i s t
And A s a n " u s e r 0 "
And G e t t i n g i n f o o f l a s t s h a r e
And t h e O C S s t a t u s c o d e s h o u l d b e " 1 0 0 "
And S h a r e f i e l d s o f l a s t s h a r e m a t c h w i t h
| u i d _ o w n e r | u s e r 0 |
| u i d _ f i l e _ o w n e r | u s e r 3 |
| s h a r e _ w i t h | g r o u p 1 |
Scenario : transferring ownership does not transfer received shares
Given u s e r " u s e r 0 " e x i s t s
And u s e r " u s e r 1 " e x i s t s
@ -316,6 +401,21 @@ Feature: transfer-ownership
| u i d _ f i l e _ o w n e r | u s e r 1 |
| s h a r e _ w i t h | u s e r 2 |
Scenario : transferring ownership of path fails for reshares
Given u s e r " u s e r 0 " e x i s t s
And u s e r " u s e r 1 " e x i s t s
And u s e r " u s e r 2 " e x i s t s
And u s e r " u s e r 3 " e x i s t s
And U s e r " u s e r 3 " c r e a t e d a f o l d e r " / t e s t "
And U s e r " u s e r 3 " u p l o a d s f i l e " d a t a / t e x t f i l e . t x t " t o " / t e s t / s o m e f i l e . t x t "
And f o l d e r " / t e s t " o f u s e r " u s e r 3 " i s s h a r e d w i t h u s e r " u s e r 0 " w i t h p e r m i s s i o n s 31
And u s e r " u s e r 0 " a c c e p t s l a s t s h a r e
And f o l d e r " / t e s t " o f u s e r " u s e r 0 " i s s h a r e d w i t h u s e r " u s e r 2 " w i t h p e r m i s s i o n s 31
And u s e r " u s e r 2 " a c c e p t s l a s t s h a r e
When t r a n s f e r r i n g o w n e r s h i p o f p a t h " t e s t " f r o m " u s e r 0 " t o " u s e r 1 "
Then t h e c o m m a n d f a i l e d w i t h e x i t c o d e 1
And t h e c o m m a n d e r r o r o u t p u t c o n t a i n s t h e t e x t " C o u l d n o t t r a n s f e r f i l e s . "
Scenario : transferring ownership does not transfer received shares
Given u s e r " u s e r 0 " e x i s t s
And u s e r " u s e r 1 " e x i s t s