Commit Graph

72 Commits (71e810b4462ee995a953b704972aaa8a7fdb5af4)

Author SHA1 Message Date
Anler Hp 75cecbed70 Task #349 - API fails when DELETE-ing an userstory
Link - https://kaleidos.taiga.io/#/project/taiga/tasks/349
2014-07-23 11:21:52 +02:00
David Barragán Merino 2e6ddbf98f Merge pull request #55 from taigaio/attachments
Check permissions when accessing attachments
2014-07-22 23:32:54 +02:00
Jesús Espino d32a9562be A lot of refactoring on close us code signals code 2014-07-21 21:23:40 +02:00
Anler Hp 52f476fb34 Check permissions when accessing attachments
Attachment files dispatching is now done through `RawAttachmentView`
view that checks for appropiate permissions.

When using the development server this view just redirects to the real
media path of the file.

When using the production server the special redirection header
`X-Accel-Redirect` is used instead to improve efficiency by instructing
the server to dispatch the file instead of django, but you also need the
following configuration (Nginx):

location /attachment-files {
    internal;
    alias /path/to/taiga/media/attachment-files;
}

It's recommended to also restrict the direct access from outside to the
`attachment-files` directory by using some configuration like this:

location /media/attachment-files {
    deny all;
}
2014-07-04 12:15:48 +02:00
Anler Hp cfc35d5ed2 Required estimated-start/end dates for milestones 2014-06-27 14:07:50 +02:00
Anler Hp c89c6e7c31 Merge pull request #51 from taigaio/tags
Tags using pg arrays
2014-06-23 11:34:02 +02:00
David Barragán Merino 767024d0d5 Add more licenses agreements to the tests module 2014-06-19 22:46:31 +02:00
Anler Hp df8a7fb73c create_membership factory function 2014-06-18 14:13:20 +02:00
Anler Hp ac5e163dc5 Implement tags using pg arrays 2014-06-18 10:14:29 +02:00
David Barragán Merino d6546dc518 Refactor searches module 2014-06-17 15:10:00 +02:00
Andrey Antukh 39bb7bcfcd Add additional factories for tests. 2014-06-12 00:12:15 +02:00
Anler Hp 9923e50603 Generic voting application
The stars application has been removed in favor of a more generic voting
application that works with any model. Starring a project is just a
special case of voting a project.

Usage.

Add a vote:

    votes.add_vote(<model instance>, user)

Remove a vote:

    votes.remove_vote(<model instance>, user)

Get the queryset of users that voted an object:

    votes.get_voters(<model instance>)

Get the number of votes an object has:

    votes.get_votes(<model instance>)

Get the objects of type <model> voted by an user:

    votes.get_voted(user, <model>)

The issues application is already making use of the votes application
through the following urls:

        /api/v1/issues/<id>/upvote      <- url name is "issues-upvote"
        /api/v1/issues/<id>/downvote    <- url name is "issues-downvote"
2014-06-02 12:03:09 +02:00
Anler Hp fcf4747e93 Service for adding, removing and listing votes 2014-05-30 12:43:34 +02:00
Andrey Antukh a998ac0660 Remove global imports from test factories. 2014-05-28 12:55:33 +02:00
Anler Hp 34f0dd6f76 List fans and starred projects
List project fans:

     /projects/<project id>/fans
     /projects/<project id>/fans/<user id>

List user starred projects:

     /users/<user id>/starred
     /users/<user id>/starred/<project id>

Also a "star" field with the stars count of a project is included in the
project detail and list responses.
2014-05-27 17:24:57 +02:00
Anler Hp b56dfe7cf5 Star/Unstar projects 2014-05-27 14:40:56 +02:00
Andrey Antukh 2b087678b9 Remove domains. 2014-05-26 17:33:12 +02:00
Anler Hp 8003abbbef Moving neighbors logic into standalone module 2014-05-22 18:34:03 +02:00
Andrey Antukh 1f1c313ca6 Add tests for project automatic sequence create/delete operations. 2014-05-21 12:38:29 +02:00
David Barragán Merino d786a1ba95 US #73: Create a user schemaless storage system 2014-05-14 14:01:31 +02:00
ikame ac0345047b Some integration tests for auth api. 2014-04-30 09:07:05 +02:00
ikame d22cbb6538 New tests skeleton and examples using pytest
Instructions (from the project root):
1. pip install -r requirements-devel.txt
2. py.test
2014-04-29 14:02:46 +02:00