Commit Graph

972 Commits (95e636b856b801fd85b21e8f7cb1ac632a57716b)

Author SHA1 Message Date
Anler Hp 95e636b856 Task #406 - Create members in bulk
Example:

        POST /memberships/bulk-create

        [{"project_id": <project id>,
          "role_id": <role id>,
          "email": <member email>}, ...]
2014-07-24 13:06:50 +02:00
Jesús Espino c7ecd622e1 Merge pull request #61 from taigaio/permissions
[HUGE CHANGE] Changed the permissions system
2014-07-24 12:32:39 +02:00
Jesús Espino d97edb464c [HUGE CHANGE] Changed the permissions system 2014-07-24 12:19:06 +02:00
Anler Hp 44f9911730 Fix neighbor tests due to change in Issue ordering 2014-07-23 14:44:10 +02:00
Anler Hp 62ddce18e7 Task #360 - Include neighbors in tasks response 2014-07-23 14:44:10 +02:00
David Barragán Merino d2de2d44a4 Fix an error 2014-07-23 12:40:38 +02:00
David Barragán Merino b6079a6ff9 Add invitations and empty projects to the sample_data command 2014-07-23 12:40:38 +02:00
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 9febd93c80 Change is_admin for is_owner in the membership model 2014-07-23 10:12:41 +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
David Barragán Merino 1f68349194 Order members 2014-07-22 21:25:06 +02:00
David Barragán Merino add0e458cf Sample data command parameterized 2014-07-22 17:34:22 +02:00
David Barragán Merino 953e1e9f55 Add is_admin to memberships, some filters to the api and some fields to the serializer 2014-07-22 12:28:09 +02:00
Jesús Espino 09b94fa2d2 Small guard to prevent problems with us is_closed calculation on us without status 2014-07-22 12:41:05 +02:00
Jesús Espino d5df49f59a Big refactor on is_closed calculation 2014-07-22 12:00:25 +02:00
Alejandro Alonso 4e043762bf Fixing small typo 2014-07-22 10:41:07 +02:00
Alejandro Alonso 136eb02cae Validating name on userstory status 2014-07-22 10:12:12 +02:00
David Barragán Merino 63ca789815 Minor fix 2014-07-22 10:05:49 +02:00
Jesús Espino d32a9562be A lot of refactoring on close us code signals code 2014-07-21 21:23:40 +02:00
David Barragán Merino a9453b97b7 Minor fixes in auth services and invitations API 2014-07-21 14:35:44 +02:00
David Barragán Merino 346ee5e51e Add copyright 2014-07-20 19:01:34 +02:00
David Barragán Merino e0c75c13ea Add project_slug to Membership serializer 2014-07-13 15:31:29 +02:00
David Barragán Merino 9d54f34ad7 Add project_name to Membership serializer 2014-07-13 15:31:15 +02:00
Anler Hp 82ddeb69a7 USs: class-based to function-based services 2014-07-11 01:04:27 +02:00
Anler Hp 40260c82ad Tasks: class-based to function-based services 2014-07-11 01:04:17 +02:00
Andrey Antukh 6068c7e6e1 Minor fixes. 2014-07-10 19:57:22 +02:00
David Barragán Merino 741fac4d65 Merge pull request #60 from taigaio/invitations
Store info of user that created an invitation
2014-07-10 15:11:23 +02:00
Anler Hp fac84dae7c Store info of user that created an invitation 2014-07-10 14:15:39 +02:00
Andrey Antukh 579f7036a6 Merge pull request #59 from yamila-moreno/patch-2
Update common.py
2014-07-09 17:41:27 +02:00
Yamila 20d895406e Update common.py
Deleted context_processor because it's for development purposes. It's already in development settings.
2014-07-09 17:40:46 +02:00
David Barragán Merino a1349416ce Merge pull request #57 from yamila-moreno/patch-1
Update celery.py
2014-07-09 15:41:38 +02:00
Yamila 0b4612de68 Update celery.py 2014-07-09 15:41:13 +02:00
David Barragán Merino 8292a11170 Add email to the forgot-password response 2014-07-09 14:10:58 +02:00
David Barragán Merino a07c6a9590 Fix the urls dict of the module front 2014-07-08 12:47:48 +02:00
Anler Hp 558ac79c5d Validate project slug to be unique 2014-07-07 13:47:12 +02:00
Alejandro Alonso 9c5bb7ff55 Fixing validator for milestone creation 2014-07-07 11:05:16 +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 9b8531d562 Removing unnecessary package (included by mistake) 2014-07-03 12:35:06 +02:00
Anler Hp 3d8c47a830 Return tags with count in `/<T>_filters_data` urls 2014-07-03 11:47:33 +02:00
Anler Hp 1e2358d0a9 Fix invalid keyword error flat 2014-07-03 09:54:57 +02:00
Andrey Antukh ec398a1d43 Merge pull request #54 from taigaio/taskqueues
Integration with RabbitMQ and Celery
2014-07-03 09:21:07 +02:00
Anler Hp 11564a95a6 Return members' photo in project detail api 2014-07-02 14:51:29 +02:00
Anler Hp 0ff888df53 Support for CELERY_ALWAYS_EAGER 2014-07-02 13:40:36 +02:00
Anler Hp 24e9d92af1 Decorator for overriding settings while testing
Usage:
```
from tests.utils import set_settings

@set_settings(FOO='bar')
def test_something():
    ...
```
2014-07-02 13:34:14 +02:00
David Barragán Merino a2b8a38016 Revert last commit in base.utils.urls 2014-07-02 13:29:29 +02:00
Anler Hp 0e414267db Integration with RabbitMQ and Celery
First update taiga-vagrant vm if you're using it, you will have access
to the rabbit management console at port 8001 of the host machine.

* Defining tasks
- Tasks must be defined in a `deferred` module of an app, for example,
`taiga.projects.deferred` module.
- Tasks must be decorated and given the name "<app>.<task-name>", for
example in `taiga.projects.deferred` module:
```
from taiga.celery import app

@app.task(name="projects.add")
def add(x, y):
    return x + y
```
- Tasks should be at most just wrappers around service functions to
promote re-usability of those functions from other parts of the code,
say, management commands and the like.

* Calling tasks
Tasks should be called using one of the three functions defined in
`taiga.deferred` module:

- `defer`: Use this function if you need to perform some task
asynchronously and GET THE RESULT back later, for example:
```
result = defer("projects.add", x=1, y=2)
...
result.get() # => 3
```

- `call_async`: Use this function when you want to fire off some
task. No result is get back. For example:
```
call_async("projects.email_user", user)
```

- `apply_async`: Is the same as `call_async` but since it's a function
application and you must pass the args and kwargs together as one
parameter each you are allowed to pass celery-specific
extra-options (but bear in mind this is not recommended!)
```
apply_async("projects.email_user", args=(user,), kwargs={}, routing_key="tasks.email")
```
2014-07-02 09:49:56 +02:00
David Barragán Merino 625c705807 Update urls.py 2014-07-02 08:14:51 +02:00
David Barragán Merino 4a21e00b6f Update README.rst 2014-07-02 08:08:48 +02:00
Anler Hp a8085a2feb Return user photo cropped and with absolute url
Remember to run `pip install -r requirements.txt` to install the
additional dependencies.
2014-07-01 14:38:26 +02:00
Anler Hp 5ff7ec1c00 Return user's gravatar if has no photo set
If the user has no photo set use her gravatar image if available
otherwise use the default avatar image defined in
`settings.DEFAULT_AVATAR_URL`
2014-07-01 12:46:58 +02:00