Statistics
| Branch: | Tag: | Revision:

root / snf-astakos-app / astakos / im / models.py @ 9fb7a900

History | View | Annotate | Download (73 kB)

# Date Author Comment
8998f09a 05/21/2013 06:28 pm Sofia Papagiannaki

astakos: unified settings handling

Import astakos settings module instead of importing specific settings

25769d1b 05/21/2013 12:41 pm Kostas Papadimitriou

astakos: Add AstakosUser status_display property

the property provides a status outline of the current user status.

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

astakos: remove unused imports

70e11eaa 05/20/2013 09:18 pm Sofia Papagiannaki

astakos: reorganize views

  • split project views from the rest views
  • move third party authentication views (astakos.im.target)
    under astakos.im.views
  • move view decorators to a separate module
  • move utility methods utilized by views to a separate module
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,...

222305b7 05/20/2013 12:44 pm Sofia Papagiannaki

astakos: replace CookieAuthenticationMiddleware with a view decorator

reverse commits ab30f5f163a13dfc7f9bec4d263208dd35f09d16 &
1439d6383113b151b6a3316e320a0418fa30d421

decorate also ``django.contrib.auth.views`` utilized by
astakos

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...

3dfb68fe 05/15/2013 06:58 pm Kostas Papadimitriou

astakos: Remove deprecated AstakosUser fields

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

764d99c4 05/14/2013 10:41 am Giorgos Korfiatis

astakos: Remove command user-set-initial-quota

To change base quota for a specified user:
snf-manage user-modify user --set-base-quota resource limit

To import base quota in batch from a file:
snf-manage astakos-quota --import-base-quota filename

Rename `initial' to `base quota' in command output....

95f33116 05/13/2013 01:56 pm Giorgos Korfiatis

astakos: Use DateTimeField for enhanced precision

Refs #3717

Replace instances of DateField in ProjectMembership and
ProjectMembershipHistory.

b095201e 05/10/2013 12:45 pm Sofia Papagiannaki

astakos: remove astakos.im.api module

Replace all AstakosCallpoint references

5c34b421 05/08/2013 06:34 pm Giorgos Korfiatis

astakos: Remove deprecated Project methods

add_member, remove_member were not used.

8ee54f74 05/08/2013 03:24 pm Kostas Papadimitriou

astakos: Exclude non existing services form Service.catalog

Always return services that exist in database. If a known service exists
use the predefined presentation data as base dict upon which we build up
the returned info by merging the data stored in service model and the...

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.

a6e18fd1 05/02/2013 12:14 pm Giorgos Korfiatis

astakos: Cleanup some project methods

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.

37d59b27 04/30/2013 08:09 pm Kostas Papadimitriou

astakos: Resources metadata improvements

- Allow admin to overwrite default resources presentation data using
ASTAKOS_RESROUCES_META setting. dict_merge is used to accomodate admin
from declaring all available metadata parameters.
- Enforce allow_in_projects resource policy in project application...

c8618788 04/30/2013 03:45 pm Giorgos Korfiatis

astakos: Control exposing resources in projects

Add attribute `allow_in_projects' in Resource model (True by default).
Set this flag for astakos.pending_app to False in the description
of astakos resources.

450c7fb0 04/23/2013 05:09 pm Kostas Papadimitriou

astakos: Initial tests for project views

a0b34382 04/22/2013 06:33 pm Giorgos Korfiatis

astakos: Reintroduce foreign key from Resource to Service

Also merge all migrations from 0026 to 0032.

34a61fff 04/19/2013 06:29 pm Kostas Papadimitriou

Service catalog fix

also include services for which no existing presentation data exist.
Admin can use ASTAKOS_SERVICE_META setting to customize the service
presentation metadata.

362ff471 04/19/2013 06:28 pm Kostas Papadimitriou

Store service access url in database

b052f360 04/19/2013 12:23 pm Giorgos Korfiatis

Move intdecimalfield.py to snf_django package

Rename it to fields.py and update all migrations that reference the field.

222a4f6a 04/19/2013 11:09 am Giorgos Korfiatis

Move managers.py to snf_django package

0cdc5cc5 04/18/2013 06:50 pm Giorgos Korfiatis

astakos: Remove obsolete ProjectResourceGrant fields

2ec5a35c 04/18/2013 06:23 pm Giorgos Korfiatis

astakos: Remove obsolete fields of AstakosUserQuota

Remove quantity, import_limit, export_limit.
Update user-set-initial-quota management command.

673f8f42 04/18/2013 05:56 pm Giorgos Korfiatis

astakos: Remove obsolete project-related model fields

Several fields of models Project and ProjectMembership were related
to the external syncing to quotaholder and have become obsolete since
the inclusion of quotaholder in astakos.

4161cb70 04/18/2013 12:20 pm Giorgos Korfiatis

Move resource data away from astakos settings

UI-related presentation data go to presentation.py.
Remove load_service_resources call and related astakos-init
management command.

34d3883a 04/18/2013 12:20 pm Giorgos Korfiatis

Make resource name independent of service name

Also remove unused ResourceMetadata model.

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...

26551b92 04/18/2013 12:20 pm Kostas Papadimitriou

Remove resource/service model dependencies

- Remove foreign key dependency between Service/Resource model. Replace
it with a service CharField to keep track of the service identifier
that the resource was registered from.
- Remove all references to resource service name in resource lookups

75380308 04/18/2013 12:20 pm Kostas Papadimitriou

Use updated resource models in projects views

0156e40c 04/18/2013 12:20 pm Kostas Papadimitriou

Services api/presentation logic cleanup

- Remove presentation information from Service model (order, icon)
- To access the list of services filled with both presentation and api
data use Service.catalog(). The method fills a dict with service
identifiers and service metadata through the following steps...

54bac253 04/18/2013 12:20 pm Kostas Papadimitriou

Astakos missing Service model migrations

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

Cleanup obsolete quota code

1028e568 04/08/2013 01:43 pm Giorgos Korfiatis

API call for resources

4850202e 04/08/2013 01:37 pm Giorgos Korfiatis

Do not register resources in quotaholder

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

Adjust astakos to new holding design

Simplifications due to removal of quantity and merging capacity into holding.
Also make sure that holders and resources are represented as strings in
quotaholder calls.

0da5e49a 04/05/2013 06:49 pm Giorgos Korfiatis

Compute and show quotas by source

Adjust astakos code to the new nested dict structure of quotas.

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...

8288906d 04/05/2013 06:48 pm Giorgos Korfiatis

Remove unused code

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.

3d4cef9e 04/05/2013 06:48 pm Giorgos Korfiatis

wip Remove check is_active on projects and memberships

Remove second phase of (de)activation, not needed any more,
since syncing to quotaholder will happen in the same transaction
as the call initiating the syncing.

14a58548 04/05/2013 06:48 pm Giorgos Korfiatis

wip Update astakos.im to simplified quotaholder policy

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

wip New, simplified syncing to quotaholder

96efed67 04/05/2013 06:39 pm Giorgos Korfiatis

Remove PROJECT_DEACTIVATED state from ProjectMembership

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

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

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

a6a152d6 03/22/2013 03:55 pm Giorgos Korfiatis

Move managers.py in synnefo.lib.db

This makes it easier to maintain, since it is used in multiple applications
(astakos.im and quotaholder_app).

2ef1e2d7 03/22/2013 12:35 pm Giorgos Korfiatis

Change output of astakos-quota --sync

Inform specifically which users, if any, have been synced, instead of
listing the whole diff. The latter can be recovered by giving the
option --verify.

f6950864 03/21/2013 06:04 pm Giorgos Korfiatis

Sync only quotas that differ

Refs #3479

Database stack limit issue was triggered by syncing quotas for
all users. It is much faster to compare quotas locally and send
for sync to quotaholder only those that differ.

9d20fe23 03/15/2013 07:49 pm Kostas Papadimitriou

Authentication providers improvements

Major authentication provider refactoring to support

- Modular and easily configurable messages with common context
- Fine grained provider policies to support appling specific policies to
users and/or groups

Key points:...

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

Astakos logging improvements

use the common user_log display method accross logging calls

97246b51 03/15/2013 07:49 pm Kostas Papadimitriou

Auth providers improvements

- Improved logging
- Messages changes
- Fixes in local module login/add policies handling

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

88f4d3b3 03/07/2013 03:14 pm Georgios D. Tsoukalas

Add 'default' capacity to user-set-initial-quota

9efc25a1 03/06/2013 03:26 pm Giorgos Korfiatis

Fix calculation of initial quotas

Also add all_quotas method in AstakosUser

Refs #3388

09a8fb8e 03/06/2013 02:27 pm Giorgos Korfiatis

Merge branch 'tmp-quota-opt2' into release-0.13

Refs #3388

Improve performance of quota operations

8d1636b5 03/05/2013 06:06 pm Giorgos Korfiatis

Set initial user quota from the command line

Refs #3373

Add option --set-capacity in user-set-initial-quota that sets
initial quota for a specified user/resource pair.

Importing from a file requires option --from-file.

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

Optimize computation of astakos user quotas

4391de3d 02/27/2013 05:10 pm Giorgos Korfiatis

Speed up project-list

c9a6e558 02/27/2013 04:54 pm Constantinos Venetsanopoulos

Verbal updates wrt help texts of astakos forms

84a1d7dd 02/27/2013 03:45 pm Georgios D. Tsoukalas

Fix some messages

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.

53777f42 02/18/2013 10:23 pm Sofia Papagiannaki

Change astakos init

Do not override service url if it is not set.

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,...

f557d10a 02/14/2013 04:27 pm Giorgos Korfiatis

Unify and rename project management commands

b6eaca30 02/14/2013 04:27 pm Giorgos Korfiatis

Encode unicode strings in str

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

Generalize instance checks for integers

d6ea9b3d 02/14/2013 04:26 pm Olga Brani

Style fixes

New style for resource usage page
Temporary help_text for profile form
Css fixes

606dea8d 02/14/2013 04:26 pm Kostas Papadimitriou

Notify user for pending registrations

astakos allows users to replace pending created accounts (user that
have not yet passed the activation process) by re-submiting the signup
form. A message is now displayed in such cases to remind the user of the
pending account.

d833fcbb 02/14/2013 04:26 pm Kostas Papadimitriou

Helper AstakosUser method

to retrieve the first auth provider assigned to user. Can be used in
activation email template to inform the user about the provider used to
create the account.

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

Make sync_projects more robust

Retry qh_add_quota on failure excluding faulty memberships.
Call given error view on exception.

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

Add LEAVE_REQUESTED state on ProjectMembership

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

Check user status when creating project membership

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

make astakos-load-service-resources idempotent

astakos-load-service-resources would only load resources correctly once,
during migration. Now it can be used at will to re-initialize service
resources from astakos configuration.

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

astakos-load-service-resources to honor service display order

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

approve, deny, dismiss views

At the project application detail, project administrators
(ASTAKOS_PROJECT_ADMINS setting) may approve or deny it.
A denied application is still viewable by the applicant,
until he dismisses it from the same page.

The project administrators' project list includes all projects.

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

fix project admin permissions

022cc8e2 02/14/2013 04:26 pm Giorgos Korfiatis

View and dismiss denied applications of an active project

e2c2cd9d 02/12/2013 05:03 pm Kostas Papadimitriou

Fix dummy field description

a7752e95 01/30/2013 09:42 pm Sofia Papagiannaki

Fix superusers (created by syncdb) command

ea05c568 01/30/2013 09:40 pm Sofia Papagiannaki

Case insensitive displayname search

5d209685 01/28/2013 07:36 pm Giorgos Korfiatis

Change display of Chain.PENDING

033f2822 01/28/2013 05:16 pm Giorgos Korfiatis

Move Chain code block before ProjectApplicationManager

2529745f 01/28/2013 05:16 pm Giorgos Korfiatis

Introduce chain state and related methods

5195c0e9 01/28/2013 12:00 pm Giorgos Korfiatis

Make Chain a proper db table

Keep chain IDs in table Chain and add foreign keys from ProjectApplication
and Project to Chain.

This will allow us to reference a possibly not yet approved project
in a more concise way.

d74111be 01/26/2013 09:14 pm Giorgos Korfiatis

Fix presentation in project template

7f31a7a3 01/25/2013 06:30 pm Giorgos Korfiatis

Check if a user other than the owner can view a project

fa153211 01/25/2013 06:12 pm Giorgos Korfiatis

Remove duplicate function

d1b04b96 01/25/2013 05:42 pm Giorgos Korfiatis

Remove obsolete user_status and its clients

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

View for cancelling a pending application

8a510584 01/24/2013 07:18 pm Kostas Papadimitriou

Preserve auth provider order across views