Statistics
| Branch: | Tag: | Revision:

root / snf-astakos-app / astakos / im / functions.py @ eb765213

History | View | Annotate | Download (33.2 kB)

# Date Author Comment
d915cf3c 09/24/2013 02:11 pm Giorgos Korfiatis

astakos: Remove duplicate project query

Enrolling a user in a project now returns 409 if the project does
not exist, rather than 404.

a5aa11ee 08/07/2013 12:01 pm Giorgos Korfiatis

astakos: Fix enroll when already requested

Enrolling a user sets its membership state directly to ACCEPTED, also
in case of REQUESTED.

2556cf45 08/07/2013 12:01 pm Giorgos Korfiatis

astakos: Describe and implement API for projects

6d583e07 08/07/2013 12:01 pm Giorgos Korfiatis

astakos: Simplify project schema

Applications now point to a project (rather than an extra model Chain).
A Project is created upon submitting an application; it always points to
a single `reference' application.

Model Chain is kept as a sequence to generate project ids.

c4028837 08/07/2013 12:01 pm Giorgos Korfiatis

astakos: Remove precursor_application field

Submit a project modification by specifying a project id rather than
an application

1a14083b 08/07/2013 12:01 pm Giorgos Korfiatis

astakos: Change project membership schema

Replace ProjectMembershipHistory with ProjectMembershipLog, which
records every state transition. Never delete any ProjectMembership
entry; set it instead to an appropriate state.

dc946891 08/07/2013 12:01 pm Giorgos Korfiatis

astakos: Omit project_id in membership operations

Identify a membership by its id only.

6335ad6f 08/07/2013 12:01 pm Giorgos Korfiatis

astakos: Lock project rather than chain

866e5768 08/07/2013 12:01 pm Giorgos Korfiatis

astakos: Cleanup checks for membership actions

b2369828 08/07/2013 12:01 pm Giorgos Korfiatis

astakos: Set project-wise resource limit in new app

e1723ca1 08/07/2013 12:01 pm Giorgos Korfiatis

astakos: Return membership when joining project

f12bcb3d 08/07/2013 12:01 pm Giorgos Korfiatis

astakos: Raise project-specific exceptions on failure

Replace IOError and PermissionDenied with project-specific exceptions.

c5b0bbb7 08/07/2013 12:01 pm Giorgos Korfiatis

astakos: Define permission levels for project actions

71c741dc 08/07/2013 12:01 pm Giorgos Korfiatis

astakos: Refactor membership checks for conciseness

da4ac460 08/07/2013 12:01 pm Giorgos Korfiatis

astakos: Add log info in membership actions

Record user who performed the action and optional reason.

88beea39 08/07/2013 12:01 pm Giorgos Korfiatis

astakos: Improve logging for Projects and Applications

Introduce model ProjectLog as well as fields in ProjectApplication
in order to record all actions.

1b52192e 08/07/2013 12:01 pm Giorgos Korfiatis

astakos: Lock globally when approving application

We need to make sure that the name to be approved is unique
among all non-terminated projects. We thus acquire a global
lock before approving.

e872c133 08/07/2013 12:01 pm Giorgos Korfiatis

astakos: Allow re-activation of terminated projects

Define function `reinstate' to re-activate a terminated project. If its
name is taken by another active project, it fails.

51db2da2 08/07/2013 12:01 pm Giorgos Korfiatis

astakos: Fix some issues pointed out by pyflakes

9096ffbb 08/07/2013 12:01 pm Giorgos Korfiatis

astakos: Update the project stress test

b10ceccd 08/07/2013 12:01 pm Giorgos Korfiatis

astakos: Enhance project tables rendering

Prefetch data in bulk queries in order to avoid continuously querying
the database.

d4e4e501 07/25/2013 12:46 pm Christos Stavrakakis

Merge branch 'hotfix-0.14.3' into develop

Conflicts:
Changelog
snf-astakos-app/astakos/im/messages.py
snf-pithos-app/pithos/api/manage_accounts/__init__.py
snf-pithos-app/pithos/api/management/commands/reconcile-resources-pithos.py
snf-pithos-app/pithos/api/settings.py...

3805be31 07/16/2013 05:07 pm Giorgos Korfiatis

astakos: Fix arg passing in messages

890f3d4c 07/12/2013 01:22 pm Christos Stavrakakis

Merge branch 'hotfix-0.14.2' into develop

Conflicts:
Changelog
snf-astakos-app/astakos/im/messages.py
snf-astakos-app/astakos/im/views/target/__init__.py
snf-cyclades-app/synnefo/logic/backend.py
snf-cyclades-app/synnefo/logic/management/commands/reconcile-servers.py...

9f715f94 07/12/2013 01:10 pm Giorgos Korfiatis

astakos: Fix arg in terminate function

ce264c16 06/28/2013 09:27 pm Christos Stavrakakis

Merge branch 'hotfix-0.14.2' into develop

Conflicts:
snf-astakos-app/astakos/im/views/projects.py
snf-cyclades-app/synnefo/logic/backend.py
snf-django-lib/snf_django/lib/astakos.py
version

caabf67f 06/28/2013 05:30 pm Giorgos Korfiatis

astakos: Fix call of helper function

34244dfa 06/28/2013 03:16 pm Giorgos Korfiatis

astakos: Disallow join/leave for non-alive projects

8fb8d0cf 06/17/2013 04:22 pm Giorgos Korfiatis

astakos: pep8 fixes

8c8e318d 06/04/2013 08:54 pm Kostas Papadimitriou

astakos: Properly resolve urls from base host

BASE_URL contains the prefix which is also included in paths returned from
django's reverse utility. Thereby joining BASE_URL with a reverse result
generates urls with duplicate BASE_PREFIX. Replaced BASE_URL with BASE_HOST in...

6c7af65c 06/03/2013 11:50 am Georgios D. Tsoukalas

astakos: remove BASEURL, use BASE_URL setting

e3ff6830 06/03/2013 11:49 am Georgios D. Tsoukalas

make synnefo URLs consistent and configurable

https://service.deployment.vendor.tld/service-base/api-prefix/hard/path |___________________________________| |__________| |________| |_______|
BASE_HOST BASE_PATH PREFIX Hardcoded...

cfb7dd4f 05/28/2013 12:32 pm Giorgos Korfiatis

astakos: Move email subjects from settings to messages

Email subjects are parameterized by site name and application-
specific data. Other than that they should be constants rather
than settings.

Remove unused GROUP_CREATION_SUBJECT.

8998f09a 05/21/2013 06:28 pm Sofia Papagiannaki

astakos: unified settings handling

Import astakos settings module instead of importing specific settings

3e0a032d 05/21/2013 11:54 am Sofia Papagiannaki

astakos: remove unused imports

3715f954 05/20/2013 05:36 pm Giorgos Korfiatis

astakos: Remove code handling UserSetting

Keep UserSetting model; to be removed in a future version.

2e7924de 05/20/2013 03:14 pm Giorgos Korfiatis

astakos: Remove some unused imports

Also add a missing import in quotas.py

3c22bad0 05/20/2013 03:14 pm Giorgos Korfiatis

astakos: Lock chain for projects, user for syncing

Lock project's chain for every operation affecting either a project or
an application. Subsequently, lock user when needing to sync or to issue
commission to update pending_app quota.

In views, replace locking qh_add_pending_app with check_pending_app_quota,...

734107ef 05/20/2013 03:09 pm Kostas Papadimitriou

branding: Use branding util to render email templates

Use synnefo_branding.util.render_to_string accross synnefo apps to be able to
use branding variables within the templates.

e182fc26 05/20/2013 03:02 pm Sofia Papagiannaki

astakos: do not catch send mail errors

The user should not be informed if for any reason
the server can not send an email.

860bb9f7 05/20/2013 02:25 pm Sofia Papagiannaki

Revert "astakos: fix send mail error handling"

This reverts commit 903ce7dccb44db3d3e5fd280a7683747dfa37d7f.

903ce7dc 05/20/2013 01:58 pm Sofia Papagiannaki

astakos: fix send mail error handling

Restore SendMailError, ChangeEmailError and SendFeedbackError exceptions
(deleted by previous commit) since they are still used.

5aa83766 05/16/2013 06:57 pm Kostas Papadimitriou

Merge branch 'feature-branding' into develop

Conflicts:
snf-astakos-app/astakos/im/templates/im/account_pending_moderation_notification.txt
snf-astakos-app/astakos/im/templates/im/group_creation_notification.txt
snf-astakos-app/astakos/im/views.py

103086a4 05/16/2013 06:41 pm Giorgos Korfiatis

astakos: Force query eval when used in __in filter

Related to commit aee9a38

Also fix call of qh_sync_users in migration script.

fa186923 05/16/2013 06:41 pm Giorgos Korfiatis

astakos: Allow submitting application with no resources

e7cb4085 05/15/2013 07:03 pm Kostas Papadimitriou

astakos: User activation flow improvements

Major refactoring on user email verification/activation process
---------------------------------------------------------------
Activation logic moved from dispersed code in functions/view modules to
ActivationBackend methods. All user activation handling code in astakos views...

251b83be 05/15/2013 06:49 pm Giorgos Korfiatis

astakos: Remove membership policy settings

Available join and leave policies are internally defined and should
not be changed by settings. Move policy descriptions to presentation.py.

Do not convert to string the lookup key in templatetags/filters.py

e336910f 05/15/2013 06:49 pm Giorgos Korfiatis

astakos: Improve quota syncing

- Split code that lists and syncs quotas
- Merge the latter with qh_sync_users
- Move qh_sync_projects in quotas.py; sync only active members
- Add missing select for update in project suspend
- Clean up quotas.py
d2c9adac 05/15/2013 06:36 pm Christos Stavrakakis

Use custom method for joining urls

Implement 'join_urls' method for joining a base URL with a path,
without worrying about redundant or missing "/". Do not use
'urlparse.urljoin', since it has different semantics.

8b9e871d 05/14/2013 03:14 pm Olga Brani

Merge branch 'develop' into feature-branding

Conflicts:
snf-astakos-app/astakos/im/static/im/cloudbar/cloudbar.js
snf-astakos-app/astakos/im/templates/im/base.html
snf-astakos-app/astakos/im/templates/im/landing.html
snf-astakos-app/astakos/im/views.py...

5dcf6618 05/13/2013 01:44 pm Giorgos Korfiatis

Revert "astakos: Fix bug in getting membership"

This reverts commit 7ce770be9fd9668fff4088eff2421cbeb0cc311e.

Update astakos tests to use membership id.

2215cd87 05/13/2013 11:47 am Giorgos Korfiatis

astakos: Remove an obsolete function

7ce770be 05/09/2013 04:14 pm Christos Stavrakakis

astakos: Fix bug in getting membership

Search based on 'person__id' and not 'id'.

7f3c4920 05/02/2013 03:49 pm Giorgos Korfiatis

astakos: Control project members by membership id

64d0c13e 05/02/2013 12:56 pm Giorgos Korfiatis

astakos: Add reason for all actions on applications

For cancel and dismiss, it is for now just a placeholder.

6da04174 05/02/2013 11:54 am Giorgos Korfiatis

astakos: Make submit_application arguments explicit

eee9ec4d 05/01/2013 05:28 pm Giorgos Korfiatis

astakos: Cleanup input of submit_application

Form passes only a tuple (name, limit) for each selected resource,
omitting presentational data.

3966d268 05/01/2013 04:43 pm Giorgos Korfiatis

astakos: Handle pair of exceptions properly

3f5851eb 04/29/2013 05:11 pm Giorgos Korfiatis

astakos: Reconcile resources

Sync number of pending applications to quotaholder.

9e3af524 04/29/2013 05:11 pm Giorgos Korfiatis

astakos: accept commission immediately after issue

Unify these operations when registering a pending application,
in order to make sure no commission can be left pending.

ec5e00aa 04/29/2013 12:13 pm Giorgos Korfiatis

Revert quotaholder's name to quotaholder_app

In order to facilitate migrations.

0a7a4104 04/23/2013 06:04 pm Kostas Papadimitriou

astakos: Replace some explicit settings imports

importing setting names explicitly makes it hard to write tests that
depend on specific setting values and polutes the module namespace.

In this commit only settings that are currently used in tests where
refactored.

9770ba6c 04/23/2013 02:50 pm Giorgos Korfiatis

Handle max pending applications as a quotable resource

Assume a resource `astakos.pending_app' related to service `astakos'.
On submitting an application, issue a commission that will update the
related counter if possible, and accept the commission on success....

d07ce657 04/22/2013 04:18 pm Giorgos Korfiatis

astakos: Standardize arguments of project calls

All calls take a request_user (of type AstakosUser) argument.

7a08e179 04/22/2013 04:18 pm Giorgos Korfiatis

pep8 and style changes

e05c541e 04/22/2013 04:17 pm Giorgos Korfiatis

astakos: Enroll in project even if request is pending

44104cd3 04/22/2013 04:02 pm Giorgos Korfiatis

astakos: Move quota syncing code in quotas.py

b1ea24f3 04/18/2013 12:20 pm Giorgos Korfiatis

Import resources from definition and config files

Register a service's resources giving option --json <file>.
The json file is expected to represent a dictionary with keys
"service" and "resources".

Currently the default base quota (uplimit) for each resource is read...

6cc50d6a 04/11/2013 01:21 pm Giorgos Korfiatis

Cleanup obsolete quota code

aee9a389 04/10/2013 03:22 pm Giorgos Korfiatis

Force query to list before passing as argument

An unevaluated query ends up being used as an argument of intended list
type to another query, which fails in the case of an EmptyQuerySet, which
is not iterable.

aa27f246 04/05/2013 06:49 pm Giorgos Korfiatis

Move quota-related code out of models.py

Intention is to collect all quota-related code to a single file.

8cbea11d 04/05/2013 06:49 pm Giorgos Korfiatis

Sync to quotaholder by recomputing user quotas

On a user joining/leaving a project or on a project definition change,
we used to compute quota diffs for affected users and add them up
to existing values in quotaholder.

We now switch to recomputing all quotas for affected users and resetting...

f77363c2 04/05/2013 06:48 pm Giorgos Korfiatis

wip Update astakos.im to use local quotaholder

Import directly quotaholder.callpoint in endpoint/qh.py
instead of an HTTP client.
Remove code related to entities, such as registering users and services.
Remove sync_projects logic.

992b81b6 04/05/2013 06:48 pm Giorgos Korfiatis

wip Remove check whether membership is pending sync

It is not needed any more, syncing to quotaholder will happen
in a single transaction along with the call initiating the change.

570015d2 04/05/2013 06:48 pm Giorgos Korfiatis

wip New, simplified syncing to quotaholder

53f8a88a 04/02/2013 01:20 pm Kostas Papadimitriou

Merge branch 'feature-branding' of https://code.grnet.gr/git/synnefo into feature-branding

878d9cf3 04/02/2013 08:49 am Kostas Papadimitriou

Merge branch 'tmp-common-email-recipients' into develop

a2110608 03/28/2013 12:12 pm Olga Brani

Branding footer improvements (Astakos+ Cyclades)

Setting that allows copyright message to footer.
Setting that allows about, feedback and support links to footer.

31bc3a62 03/27/2013 11:26 pm Kostas Papadimitriou

Astakos email notification improvements

- Use project setting SERVER_EMAIL as sender to all email notifications.
- Remove astakos specific DEFAULT_CONTAC_EMAIL in favor of snf-common's
CONTACT_EMAIL setting.
- Remove DEFAULT_CONTACT_EMAIL and ADMINS astakos specific settings in favor of...

db472f3d 03/26/2013 06:42 pm Giorgos Korfiatis

Impose pending application limit on owner

We used to check the limit on applicant; however we would like to
to control pending applications per the original applicant, i.e the
owner. The check is ignored when the applicant is a project admin.

f30f0170 03/26/2013 06:42 pm Giorgos Korfiatis

Log project actions

6f25ec42 03/26/2013 03:50 pm Kostas Papadimitriou

Merge branch 'release-0.13' into feature-astakos-authpolicies

2b745492 03/26/2013 01:30 pm Giorgos Korfiatis

Specify reason when denying project application

Add field `response' in ProjectApplication model.
Add option `-m' in project-control command.

Refs #3493

5d5ce247 03/15/2013 07:49 pm Kostas Papadimitriou

Astakos logging improvements

use the common user_log display method accross logging calls

5df4c364 03/07/2013 07:01 pm Kostas Papadimitriou

Astakos logging fixes

Removed with_logging wrapper which inconsistently extracted user/request
arguments. Logging statements placed explicitly within login/logout
methods.

Fix admin notification logging

a989b48e 02/27/2013 05:10 pm Giorgos Korfiatis

Optimize computation of astakos user quotas

c7c0ec58 02/27/2013 03:45 pm Giorgos Korfiatis

Add per-user limit on pending applications

Add UserSettings model for storing integer-valued settings.
If an entry is missing, a default synnefo setting is consulted.

The limit can be set/unset with snf-manage user-update.

e30537f1 02/21/2013 07:47 pm Sofia Papagiannaki

Bug fixing

abd8467c 02/14/2013 04:28 pm Giorgos Korfiatis

Create membership without causing DB error on existence

ea1e5d9f 02/14/2013 04:28 pm Giorgos Korfiatis

Make ForUpdateManager thread-safe

The manager held a global flag `_for_update' on a single manager object,
which could be read or set by multiple threads.

select_for_update() is now provided by a subclass of QuerySet.
It must be used as the last modifier of a query set,...

9301c7f9 02/14/2013 04:27 pm Sofia Papagiannaki

Fix change email text

c9b3d7b0 02/14/2013 04:27 pm Kostas Papadimitriou

Update email change email content

- Include EmailChange instance in template context
- Email body improvements

0932ac43 02/14/2013 04:27 pm Giorgos Korfiatis

Automate the stress test for projects

8c7229a8 02/14/2013 04:27 pm Giorgos Korfiatis

Generalize instance checks for integers

c1007621 02/14/2013 04:26 pm Giorgos Korfiatis

Add LEAVE_REQUESTED state on ProjectMembership

c10f1cf5 02/14/2013 04:26 pm Giorgos Korfiatis

Utility function get_project_by_name

d9907a5e 02/14/2013 04:26 pm Giorgos Korfiatis

Check user status when creating project membership

466cc12c 02/14/2013 04:26 pm Giorgos Korfiatis

Notify for project enrollment

bb6a4465 02/14/2013 04:26 pm Giorgos Korfiatis

Add membership notifications

97e93991 02/14/2013 04:26 pm Kostas Papadimitriou

Ensure only verified users are added to a project

since users get registered at quotaholder during the activation process
(qh_register_user_with_quotas call in `activate` method -- im/functions.py).

An additional safer check in `create_membership` method might be...