Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (28.8 kB)

# Date Author Comment
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...

beda5f0f 02/14/2013 04:26 pm Georgios D. Tsoukalas

fix project admin permissions

6cee26a0 01/30/2013 05:20 pm Giorgos Korfiatis

Restrict argument of approve_application() to application id

610d0948 01/26/2013 09:28 pm Giorgos Korfiatis

Remove obsolete function get_project_id_of_application_id

a75dbd7b 01/25/2013 12:26 pm Giorgos Korfiatis

View for cancelling a pending application

d4660e00 01/24/2013 07:04 pm Giorgos Korfiatis

Changes in project_detail

Distinguish project/application view as well as
owner/simple user mode

8cf9b2dd 01/23/2013 06:59 pm Giorgos Korfiatis

Use custom project_transaction_context in project views

7d145e78 01/23/2013 06:51 pm Sofia Papagiannaki

Change feedback email sender and body

aad0e329 01/22/2013 06:55 pm Giorgos Korfiatis

Option to cancel membership request

3e3743f2 01/22/2013 05:56 pm Giorgos Korfiatis

wip More progress with chains

ff67242a 01/22/2013 01:28 pm Giorgos Korfiatis

wip Project views by chain_id

01bdbd17 01/22/2013 11:58 am Giorgos Korfiatis

Checks for operations on applications

14f7f6a5 01/22/2013 11:30 am Giorgos Korfiatis

Fix membership checks

d4fc6292 01/21/2013 11:45 pm Giorgos Korfiatis

Checks for membership functions

f9224cc0 01/21/2013 09:11 pm Sofia Papagiannaki

Fix unicode urlencoding in feedback call

3c049f6d 01/21/2013 02:16 pm Giorgos Korfiatis

Better log printing

84a3f701 01/18/2013 04:59 pm Giorgos Korfiatis

Advances in syncing quotaholder with astakos

Factor out trigger_sync() as lock_sync() to be used for other
sync processes in addition to sync_projects().
Implement sync_users(), which registers users and their quotas.
Use both sync processes in astakos-qh-sync management command.

7eadc230 01/17/2013 06:52 pm Giorgos Korfiatis

Management command to check and perform project expiration

db99f198 01/15/2013 02:56 pm Giorgos Korfiatis

Implement project suspension and resumption

Merge membership's SUSPENDED and TERMINATED states into PROJECT_DEACTIVATED.

79991070 01/14/2013 07:40 pm Giorgos Korfiatis

Remove unused update_application()

3c638f72 01/14/2013 07:40 pm Giorgos Korfiatis

Add states DISMISSED and CANCELLED in ProjectApplication and related calls
Fix defaults in DateTimeFields

0514bcc7 01/14/2013 05:50 pm Giorgos Korfiatis

Changes in registering to quotaholder

Add an 'uplimit' (default) field in Resource;
change AstakosUserQuota fields to IntDecimalField;
pass all four limits of initial quotas to the quotaholder;
register services and resources explicitly upon creation;
a wrapper for get_quota.

19eb3ee6 01/11/2013 04:33 pm Giorgos Korfiatis

Implement application denial

21e0fdad 01/10/2013 05:40 pm Giorgos Korfiatis

Register a user to quotaholder only when is activated

b6fe8bb8 01/10/2013 04:31 pm Giorgos Korfiatis

New state handling for astakos projects and memberships

Distinguishes is_active, is_pending flags from actual states in ProjectMembership;
likewise is_active, is_modified flags in Project.
Splits syncing in pre-process, actual syncing, and post-process.

a3eb3a95 01/08/2013 07:17 pm Giorgos Korfiatis

Refactor notifications

907f15db 01/08/2013 06:56 pm Giorgos Korfiatis

Remove bypass checks; refactor some checks

ee4aa6eb 01/08/2013 04:19 pm Giorgos Korfiatis

Check user credentials in submit_application

8c3e6cb5 01/08/2013 04:00 pm Kostas Papadimitriou

Missing var

15ca2bea 01/08/2013 03:57 pm Giorgos Korfiatis

Refactor submit application; always mark precursor as REPLACED