Package expedient :: Package clearinghouse :: Package project :: Module views
[hide private]
[frames] | no frames]

Module views

source code


Author: jnaous

Functions [hide private]
 
list(request)
Show list of projects
source code
 
delete(request, proj_id)
Delete the project
source code
 
detail(request, proj_id)
Show information about the project
source code
 
create_project_roles(project, user)
Create the default roles in a project.
source code
 
create(request)
Create a new project
source code
 
update(request, proj_id, iframe=False)
Update information about a project
source code
 
add_aggregate(request, proj_id)
Add/remove aggregates to/from a project
source code
 
update_aggregate(request, proj_id, agg_id)
Update any info stored at the aggregate
source code
 
remove_aggregate(request, proj_id, agg_id)
Remove the aggregate from the project
source code
 
add_member(request, proj_id)
Add a member to the project
source code
 
update_member(request, proj_id, user_id)
Update a member's roles
source code
 
remove_member(request, proj_id, user_id)
Kick a member out by stripping his roles
source code
Variables [hide private]
  logger = logging.getLogger("project.views")
  TEMPLATE_PATH = 'project'
  DEFAULT_OWNER_PERMISSIONS = ['can_edit_project', 'can_delete_p...
  DEFAULT_RESEARCHER_PERMISSIONS = ['can_view_project', 'can_cre...
  __package__ = 'expedient.clearinghouse.project'
Function Details [hide private]

delete(request, proj_id)

source code 

Delete the project

Decorators:
  • @require_objs_permissions_for_view(perm_names= ["can_delete_slices"], permittee_func= get_user_from_req, target_func= get_queryset(Project, "proj_id"), methods= ["GET", "POST"],)
  • @require_objs_permissions_for_view(perm_names= ["can_delete_project"], permittee_func= get_user_from_req, target_func= get_queryset(Project, "proj_id"), methods= ["GET", "POST"],)

detail(request, proj_id)

source code 

Show information about the project

Decorators:
  • @require_objs_permissions_for_view(perm_names= ["can_view_project"], permittee_func= get_user_from_req, target_func= get_queryset(Project, "proj_id"),)

create(request)

source code 

Create a new project

Decorators:
  • @require_objs_permissions_for_view(perm_names= ["can_create_project"], permittee_func= get_user_from_req, target_func= get_queryset_from_class(Project),)

update(request, proj_id, iframe=False)

source code 

Update information about a project

Decorators:
  • @require_objs_permissions_for_view(perm_names= ["can_view_project"], permittee_func= get_user_from_req, target_func= get_queryset(Project, "proj_id"),)
  • @require_objs_permissions_for_view(perm_names= ["can_edit_project"], permittee_func= get_user_from_req, target_func= get_queryset(Project, "proj_id"), methods= ["POST"],)

add_aggregate(request, proj_id)

source code 

Add/remove aggregates to/from a project

Decorators:
  • @require_objs_permissions_for_view(perm_names= ["can_add_aggregates"], permittee_func= get_user_from_req, target_func= get_queryset(Project, "proj_id"),)

update_aggregate(request, proj_id, agg_id)

source code 

Update any info stored at the aggregate

Decorators:
  • @require_objs_permissions_for_view(perm_names= ["can_add_aggregates"], permittee_func= get_user_from_req, target_func= get_queryset(Project, "proj_id"),)

remove_aggregate(request, proj_id, agg_id)

source code 

Remove the aggregate from the project

Decorators:
  • @require_objs_permissions_for_view(perm_names= ["can_remove_aggregates"], permittee_func= get_user_from_req, target_func= get_queryset(Project, "proj_id"),)

add_member(request, proj_id)

source code 

Add a member to the project

Decorators:
  • @require_objs_permissions_for_view(perm_names= ["can_add_members"], permittee_func= get_user_from_req, target_func= get_queryset(Project, "proj_id"),)

update_member(request, proj_id, user_id)

source code 

Update a member's roles

Decorators:
  • @require_objs_permissions_for_view(perm_names= ["can_add_members"], permittee_func= get_user_from_req, target_func= get_queryset(Project, "proj_id"),)

remove_member(request, proj_id, user_id)

source code 

Kick a member out by stripping his roles

Decorators:
  • @require_objs_permissions_for_view(perm_names= ["can_remove_members"], permittee_func= get_user_from_req, target_func= get_queryset(Project, "proj_id"),)

Variables Details [hide private]

DEFAULT_OWNER_PERMISSIONS

Value:
['can_edit_project',
 'can_delete_project',
 'can_view_project',
 'can_add_members',
 'can_remove_members',
 'can_create_slices',
 'can_edit_slices',
 'can_delete_slices',
...

DEFAULT_RESEARCHER_PERMISSIONS

Value:
['can_view_project',
 'can_create_slices',
 'can_edit_slices',
 'can_delete_slices',
 'can_start_slices',
 'can_stop_slices']