Home > Blog > Programming > GSoC: Testers needed for sharing files with ownCloud

GSoC: Testers needed for sharing files with ownCloud

July 21st, 2011

I have good news this week. First, I’m still here because I passed the mid-term evaluation for Google Summer of Code. Thanks for passing me Robin. Second, I was successful in completing my goal last week and now have everything setup so others can start experimenting with sharing files.

Besides general bug fixing this past week I’ve also refactored OC_SHARE, which is the class that handles the database records of all shared files in ownCloud. It started to get a little messy and I was unhappy with the quality of code so I rewrote many of the functions and moved some of the error handling into OC_FILESTORAGE_SHARED where it should belong. I also commented all of the functions so other developers can use OC_SHARE in their own apps and understand what it is doing. I’ve also added two hooks to OC_SHARE: post_delete and post_rename. These are triggered by OC_FILESYSTEM when files are deleted, renamed, or moved. The database gets updated when these actions occur in order to avoid any missing shared items.

The backend for sharing is pretty much complete so I can now focus on the user interface for the rest of the summer. The only part that needs updating is the permissions system. I was having a difficult time deciding on what to do with permissions and ended up going with only read and write, without the ability to permanently delete files. I’ve changed my mind now and will expand the options to more specific permissions that you can assign users. I was worried before that this would make the user interface too complex, but I now believe I can still achieve simplicity with the user experience.

The first implementation of a sharing user interface

This week I created a user interface for adding shared files and listing your shared files. Before this I was using phpMyAdmin for sharing files, manually inserting database records, which wasn’t much fun. The user interface is far from complete, my goal is to give users the ability to share files from directly in the web frontend file browser and for users to easily see what files of theirs are shared and to who. I’ll be discussing how sharing should work in terms of user interface with the other ownCloud developers and users to make it the best possible experience.

If you want to help test the sharing branch, follow these instructions:

  1. git clone git://anongit.kde.org/owncloud
  2. Inside the git working directory: git checkout -t origin/sharing
  3. Install ownCloud using these instructions. Please use MySQL for the time being, there are some problems with the queries with SQLite.
  4. Create two users
  5. Go to ‘Share’ on the left sidebar
  6. Fill out the form to share a file. The item field has autocomplete for files and permissions should be either 0 or 1 for read or read/write.
  7. Create the directory ‘Share’ with the other user

The storage provider should mount itself at ‘Share’ and the file should appear there.┬áTry renaming and moving files around on both users. The web frontend doesn’t have complete support for file management so try using WebDAV to work with the files. I’ll be working on this branch all week so try a git pull or follow the commits on KDE QuickGit. If you need any help using sharing or have any questions leave a comment or visit the ownCloud IRC channel.

This week I’ll be working on optimizing the user interface, such as adding/removing rows from the table when items are shared/unshared, grouping together files that are shared with multiple users, and adding autocomplete for users. I’ll try my best to get this branch ready for ownCloud 2.0.

Categories: Programming Tags: , ,
  1. August 22nd, 2011 at 07:32 | #1

    Hi, tested this with two users and a directory. Works perfect.

Comments are closed.