Example here: https://sf-tvansteenburgh-1020.sb.sf.net/p/testactivity/activity/
No automated tests since I couldn't find any tests for refresh_repo().
To test manually, make sure activitystream is enabled in ini, create new project, create repo, commit to it, view project activity page. (I tested with git, hg, and svn.)
Obviously this will be more useful with detail like the commit message included. Will add that with [#6829].
has_activity_access should do a permission check on the tool
Force-pushed a fix.
Looks good. Just making a small tweak to simplify logic:
- if app_config:
- project = Project.query.get(_id=app_config.project_id)
- app = app_config.load()(project, app_config)
- return has_access(app, perm, user, project)
+ return has_access(app_config, perm, user)
This works since app_config.project automatically loads via app_config.project_id. And has_access checks for None and also loads the project via the first param.
Log in to post a comment.