##// END OF EJS Templates
fixed missing commit after hook delete
marcink -
r2086:eefb197b beta
parent child Browse files
Show More
@@ -1,557 +1,561 b''
1 .. _changelog:
1 .. _changelog:
2
2
3 Changelog
3 Changelog
4 =========
4 =========
5
5
6
6
7 1.3.3 (**2012-XX-XX**)
7 1.3.3 (**2012-XX-XX**)
8 ----------------------
8 ----------------------
9
9
10 :status: in-progress
10 :status: in-progress
11 :branch: beta
11 :branch: beta
12
12
13 news
13 news
14 ++++
14 ++++
15
15
16
16
17 fixes
17 fixes
18 +++++
18 +++++
19
19
20 - fixed some python2.5 compatibility issues
20 - fixed some python2.5 compatibility issues
21 - fixed issues with removed repos was accidentally added as groups, after
21 - fixed issues with removed repos was accidentally added as groups, after
22 full rescan of paths
22 full rescan of paths
23 - fixes #376 Cannot edit user (using container auth)
23 - fixes #376 Cannot edit user (using container auth)
24 - fixes #378 Invalid image urls on changeset screen with proxy-prefix
24 - fixes #378 Invalid image urls on changeset screen with proxy-prefix
25 configuration
25 configuration
26 - fixed initial sorting of repos inside repo group
26 - fixed initial sorting of repos inside repo group
27 - fixes issue when user tried to resubmit same permission into user/user_groups
27 - fixes issue when user tried to resubmit same permission into user/user_groups
28 - bumped beaker version that fixes #375 leap error bug
29 - fixed raw_changeset for git. It was generated with hg patch headers
30 - fixed vcs issue with last_changeset for filenodes
31 - fixed missing commit after hook delete
28
32
29 1.3.2 (**2012-02-28**)
33 1.3.2 (**2012-02-28**)
30 ----------------------
34 ----------------------
31
35
32 news
36 news
33 ++++
37 ++++
34
38
35
39
36 fixes
40 fixes
37 +++++
41 +++++
38
42
39 - fixed git protocol issues with repos-groups
43 - fixed git protocol issues with repos-groups
40 - fixed git remote repos validator that prevented from cloning remote git repos
44 - fixed git remote repos validator that prevented from cloning remote git repos
41 - fixes #370 ending slashes fixes for repo and groups
45 - fixes #370 ending slashes fixes for repo and groups
42 - fixes #368 improved git-protocol detection to handle other clients
46 - fixes #368 improved git-protocol detection to handle other clients
43 - fixes #366 When Setting Repository Group To Blank Repo Group Wont Be
47 - fixes #366 When Setting Repository Group To Blank Repo Group Wont Be
44 Moved To Root
48 Moved To Root
45 - fixes #371 fixed issues with beaker/sqlalchemy and non-ascii cache keys
49 - fixes #371 fixed issues with beaker/sqlalchemy and non-ascii cache keys
46 - fixed #373 missing cascade drop on user_group_to_perm table
50 - fixed #373 missing cascade drop on user_group_to_perm table
47
51
48 1.3.1 (**2012-02-27**)
52 1.3.1 (**2012-02-27**)
49 ----------------------
53 ----------------------
50
54
51 news
55 news
52 ++++
56 ++++
53
57
54
58
55 fixes
59 fixes
56 +++++
60 +++++
57
61
58 - redirection loop occurs when remember-me wasn't checked during login
62 - redirection loop occurs when remember-me wasn't checked during login
59 - fixes issues with git blob history generation
63 - fixes issues with git blob history generation
60 - don't fetch branch for git in file history dropdown. Causes unneeded slowness
64 - don't fetch branch for git in file history dropdown. Causes unneeded slowness
61
65
62 1.3.0 (**2012-02-26**)
66 1.3.0 (**2012-02-26**)
63 ----------------------
67 ----------------------
64
68
65 news
69 news
66 ++++
70 ++++
67
71
68 - code review, inspired by github code-comments
72 - code review, inspired by github code-comments
69 - #215 rst and markdown README files support
73 - #215 rst and markdown README files support
70 - #252 Container-based and proxy pass-through authentication support
74 - #252 Container-based and proxy pass-through authentication support
71 - #44 branch browser. Filtering of changelog by branches
75 - #44 branch browser. Filtering of changelog by branches
72 - mercurial bookmarks support
76 - mercurial bookmarks support
73 - new hover top menu, optimized to add maximum size for important views
77 - new hover top menu, optimized to add maximum size for important views
74 - configurable clone url template with possibility to specify protocol like
78 - configurable clone url template with possibility to specify protocol like
75 ssh:// or http:// and also manually alter other parts of clone_url.
79 ssh:// or http:// and also manually alter other parts of clone_url.
76 - enabled largefiles extension by default
80 - enabled largefiles extension by default
77 - optimized summary file pages and saved a lot of unused space in them
81 - optimized summary file pages and saved a lot of unused space in them
78 - #239 option to manually mark repository as fork
82 - #239 option to manually mark repository as fork
79 - #320 mapping of commit authors to RhodeCode users
83 - #320 mapping of commit authors to RhodeCode users
80 - #304 hashes are displayed using monospace font
84 - #304 hashes are displayed using monospace font
81 - diff configuration, toggle white lines and context lines
85 - diff configuration, toggle white lines and context lines
82 - #307 configurable diffs, whitespace toggle, increasing context lines
86 - #307 configurable diffs, whitespace toggle, increasing context lines
83 - sorting on branches, tags and bookmarks using YUI datatable
87 - sorting on branches, tags and bookmarks using YUI datatable
84 - improved file filter on files page
88 - improved file filter on files page
85 - implements #330 api method for listing nodes ar particular revision
89 - implements #330 api method for listing nodes ar particular revision
86 - #73 added linking issues in commit messages to chosen issue tracker url
90 - #73 added linking issues in commit messages to chosen issue tracker url
87 based on user defined regular expression
91 based on user defined regular expression
88 - added linking of changesets in commit messages
92 - added linking of changesets in commit messages
89 - new compact changelog with expandable commit messages
93 - new compact changelog with expandable commit messages
90 - firstname and lastname are optional in user creation
94 - firstname and lastname are optional in user creation
91 - #348 added post-create repository hook
95 - #348 added post-create repository hook
92 - #212 global encoding settings is now configurable from .ini files
96 - #212 global encoding settings is now configurable from .ini files
93 - #227 added repository groups permissions
97 - #227 added repository groups permissions
94 - markdown gets codehilite extensions
98 - markdown gets codehilite extensions
95 - new API methods, delete_repositories, grante/revoke permissions for groups
99 - new API methods, delete_repositories, grante/revoke permissions for groups
96 and repos
100 and repos
97
101
98
102
99 fixes
103 fixes
100 +++++
104 +++++
101
105
102 - rewrote dbsession management for atomic operations, and better error handling
106 - rewrote dbsession management for atomic operations, and better error handling
103 - fixed sorting of repo tables
107 - fixed sorting of repo tables
104 - #326 escape of special html entities in diffs
108 - #326 escape of special html entities in diffs
105 - normalized user_name => username in api attributes
109 - normalized user_name => username in api attributes
106 - fixes #298 ldap created users with mixed case emails created conflicts
110 - fixes #298 ldap created users with mixed case emails created conflicts
107 on saving a form
111 on saving a form
108 - fixes issue when owner of a repo couldn't revoke permissions for users
112 - fixes issue when owner of a repo couldn't revoke permissions for users
109 and groups
113 and groups
110 - fixes #271 rare JSON serialization problem with statistics
114 - fixes #271 rare JSON serialization problem with statistics
111 - fixes #337 missing validation check for conflicting names of a group with a
115 - fixes #337 missing validation check for conflicting names of a group with a
112 repositories group
116 repositories group
113 - #340 fixed session problem for mysql and celery tasks
117 - #340 fixed session problem for mysql and celery tasks
114 - fixed #331 RhodeCode mangles repository names if the a repository group
118 - fixed #331 RhodeCode mangles repository names if the a repository group
115 contains the "full path" to the repositories
119 contains the "full path" to the repositories
116 - #355 RhodeCode doesn't store encrypted LDAP passwords
120 - #355 RhodeCode doesn't store encrypted LDAP passwords
117
121
118 1.2.5 (**2012-01-28**)
122 1.2.5 (**2012-01-28**)
119 ----------------------
123 ----------------------
120
124
121 news
125 news
122 ++++
126 ++++
123
127
124 fixes
128 fixes
125 +++++
129 +++++
126
130
127 - #340 Celery complains about MySQL server gone away, added session cleanup
131 - #340 Celery complains about MySQL server gone away, added session cleanup
128 for celery tasks
132 for celery tasks
129 - #341 "scanning for repositories in None" log message during Rescan was missing
133 - #341 "scanning for repositories in None" log message during Rescan was missing
130 a parameter
134 a parameter
131 - fixed creating archives with subrepos. Some hooks were triggered during that
135 - fixed creating archives with subrepos. Some hooks were triggered during that
132 operation leading to crash.
136 operation leading to crash.
133 - fixed missing email in account page.
137 - fixed missing email in account page.
134 - Reverted Mercurial to 2.0.1 for windows due to bug in Mercurial that makes
138 - Reverted Mercurial to 2.0.1 for windows due to bug in Mercurial that makes
135 forking on windows impossible
139 forking on windows impossible
136
140
137 1.2.4 (**2012-01-19**)
141 1.2.4 (**2012-01-19**)
138 ----------------------
142 ----------------------
139
143
140 news
144 news
141 ++++
145 ++++
142
146
143 - RhodeCode is bundled with mercurial series 2.0.X by default, with
147 - RhodeCode is bundled with mercurial series 2.0.X by default, with
144 full support to largefiles extension. Enabled by default in new installations
148 full support to largefiles extension. Enabled by default in new installations
145 - #329 Ability to Add/Remove Groups to/from a Repository via AP
149 - #329 Ability to Add/Remove Groups to/from a Repository via AP
146 - added requires.txt file with requirements
150 - added requires.txt file with requirements
147
151
148 fixes
152 fixes
149 +++++
153 +++++
150
154
151 - fixes db session issues with celery when emailing admins
155 - fixes db session issues with celery when emailing admins
152 - #331 RhodeCode mangles repository names if the a repository group
156 - #331 RhodeCode mangles repository names if the a repository group
153 contains the "full path" to the repositories
157 contains the "full path" to the repositories
154 - #298 Conflicting e-mail addresses for LDAP and RhodeCode users
158 - #298 Conflicting e-mail addresses for LDAP and RhodeCode users
155 - DB session cleanup after hg protocol operations, fixes issues with
159 - DB session cleanup after hg protocol operations, fixes issues with
156 `mysql has gone away` errors
160 `mysql has gone away` errors
157 - #333 doc fixes for get_repo api function
161 - #333 doc fixes for get_repo api function
158 - #271 rare JSON serialization problem with statistics enabled
162 - #271 rare JSON serialization problem with statistics enabled
159 - #337 Fixes issues with validation of repository name conflicting with
163 - #337 Fixes issues with validation of repository name conflicting with
160 a group name. A proper message is now displayed.
164 a group name. A proper message is now displayed.
161 - #292 made ldap_dn in user edit readonly, to get rid of confusion that field
165 - #292 made ldap_dn in user edit readonly, to get rid of confusion that field
162 doesn't work
166 doesn't work
163 - #316 fixes issues with web description in hgrc files
167 - #316 fixes issues with web description in hgrc files
164
168
165 1.2.3 (**2011-11-02**)
169 1.2.3 (**2011-11-02**)
166 ----------------------
170 ----------------------
167
171
168 news
172 news
169 ++++
173 ++++
170
174
171 - added option to manage repos group for non admin users
175 - added option to manage repos group for non admin users
172 - added following API methods for get_users, create_user, get_users_groups,
176 - added following API methods for get_users, create_user, get_users_groups,
173 get_users_group, create_users_group, add_user_to_users_groups, get_repos,
177 get_users_group, create_users_group, add_user_to_users_groups, get_repos,
174 get_repo, create_repo, add_user_to_repo
178 get_repo, create_repo, add_user_to_repo
175 - implements #237 added password confirmation for my account
179 - implements #237 added password confirmation for my account
176 and admin edit user.
180 and admin edit user.
177 - implements #291 email notification for global events are now sent to all
181 - implements #291 email notification for global events are now sent to all
178 administrator users, and global config email.
182 administrator users, and global config email.
179
183
180 fixes
184 fixes
181 +++++
185 +++++
182
186
183 - added option for passing auth method for smtp mailer
187 - added option for passing auth method for smtp mailer
184 - #276 issue with adding a single user with id>10 to usergroups
188 - #276 issue with adding a single user with id>10 to usergroups
185 - #277 fixes windows LDAP settings in which missing values breaks the ldap auth
189 - #277 fixes windows LDAP settings in which missing values breaks the ldap auth
186 - #288 fixes managing of repos in a group for non admin user
190 - #288 fixes managing of repos in a group for non admin user
187
191
188 1.2.2 (**2011-10-17**)
192 1.2.2 (**2011-10-17**)
189 ----------------------
193 ----------------------
190
194
191 news
195 news
192 ++++
196 ++++
193
197
194 - #226 repo groups are available by path instead of numerical id
198 - #226 repo groups are available by path instead of numerical id
195
199
196 fixes
200 fixes
197 +++++
201 +++++
198
202
199 - #259 Groups with the same name but with different parent group
203 - #259 Groups with the same name but with different parent group
200 - #260 Put repo in group, then move group to another group -> repo becomes unavailable
204 - #260 Put repo in group, then move group to another group -> repo becomes unavailable
201 - #258 RhodeCode 1.2 assumes egg folder is writable (lockfiles problems)
205 - #258 RhodeCode 1.2 assumes egg folder is writable (lockfiles problems)
202 - #265 ldap save fails sometimes on converting attributes to booleans,
206 - #265 ldap save fails sometimes on converting attributes to booleans,
203 added getter and setter into model that will prevent from this on db model level
207 added getter and setter into model that will prevent from this on db model level
204 - fixed problems with timestamps issues #251 and #213
208 - fixed problems with timestamps issues #251 and #213
205 - fixes #266 RhodeCode allows to create repo with the same name and in
209 - fixes #266 RhodeCode allows to create repo with the same name and in
206 the same parent as group
210 the same parent as group
207 - fixes #245 Rescan of the repositories on Windows
211 - fixes #245 Rescan of the repositories on Windows
208 - fixes #248 cannot edit repos inside a group on windows
212 - fixes #248 cannot edit repos inside a group on windows
209 - fixes #219 forking problems on windows
213 - fixes #219 forking problems on windows
210
214
211 1.2.1 (**2011-10-08**)
215 1.2.1 (**2011-10-08**)
212 ----------------------
216 ----------------------
213
217
214 news
218 news
215 ++++
219 ++++
216
220
217
221
218 fixes
222 fixes
219 +++++
223 +++++
220
224
221 - fixed problems with basic auth and push problems
225 - fixed problems with basic auth and push problems
222 - gui fixes
226 - gui fixes
223 - fixed logger
227 - fixed logger
224
228
225 1.2.0 (**2011-10-07**)
229 1.2.0 (**2011-10-07**)
226 ----------------------
230 ----------------------
227
231
228 news
232 news
229 ++++
233 ++++
230
234
231 - implemented #47 repository groups
235 - implemented #47 repository groups
232 - implemented #89 Can setup google analytics code from settings menu
236 - implemented #89 Can setup google analytics code from settings menu
233 - implemented #91 added nicer looking archive urls with more download options
237 - implemented #91 added nicer looking archive urls with more download options
234 like tags, branches
238 like tags, branches
235 - implemented #44 into file browsing, and added follow branch option
239 - implemented #44 into file browsing, and added follow branch option
236 - implemented #84 downloads can be enabled/disabled for each repository
240 - implemented #84 downloads can be enabled/disabled for each repository
237 - anonymous repository can be cloned without having to pass default:default
241 - anonymous repository can be cloned without having to pass default:default
238 into clone url
242 into clone url
239 - fixed #90 whoosh indexer can index chooses repositories passed in command
243 - fixed #90 whoosh indexer can index chooses repositories passed in command
240 line
244 line
241 - extended journal with day aggregates and paging
245 - extended journal with day aggregates and paging
242 - implemented #107 source code lines highlight ranges
246 - implemented #107 source code lines highlight ranges
243 - implemented #93 customizable changelog on combined revision ranges -
247 - implemented #93 customizable changelog on combined revision ranges -
244 equivalent of githubs compare view
248 equivalent of githubs compare view
245 - implemented #108 extended and more powerful LDAP configuration
249 - implemented #108 extended and more powerful LDAP configuration
246 - implemented #56 users groups
250 - implemented #56 users groups
247 - major code rewrites optimized codes for speed and memory usage
251 - major code rewrites optimized codes for speed and memory usage
248 - raw and diff downloads are now in git format
252 - raw and diff downloads are now in git format
249 - setup command checks for write access to given path
253 - setup command checks for write access to given path
250 - fixed many issues with international characters and unicode. It uses utf8
254 - fixed many issues with international characters and unicode. It uses utf8
251 decode with replace to provide less errors even with non utf8 encoded strings
255 decode with replace to provide less errors even with non utf8 encoded strings
252 - #125 added API KEY access to feeds
256 - #125 added API KEY access to feeds
253 - #109 Repository can be created from external Mercurial link (aka. remote
257 - #109 Repository can be created from external Mercurial link (aka. remote
254 repository, and manually updated (via pull) from admin panel
258 repository, and manually updated (via pull) from admin panel
255 - beta git support - push/pull server + basic view for git repos
259 - beta git support - push/pull server + basic view for git repos
256 - added followers page and forks page
260 - added followers page and forks page
257 - server side file creation (with binary file upload interface)
261 - server side file creation (with binary file upload interface)
258 and edition with commits powered by codemirror
262 and edition with commits powered by codemirror
259 - #111 file browser file finder, quick lookup files on whole file tree
263 - #111 file browser file finder, quick lookup files on whole file tree
260 - added quick login sliding menu into main page
264 - added quick login sliding menu into main page
261 - changelog uses lazy loading of affected files details, in some scenarios
265 - changelog uses lazy loading of affected files details, in some scenarios
262 this can improve speed of changelog page dramatically especially for
266 this can improve speed of changelog page dramatically especially for
263 larger repositories.
267 larger repositories.
264 - implements #214 added support for downloading subrepos in download menu.
268 - implements #214 added support for downloading subrepos in download menu.
265 - Added basic API for direct operations on rhodecode via JSON
269 - Added basic API for direct operations on rhodecode via JSON
266 - Implemented advanced hook management
270 - Implemented advanced hook management
267
271
268 fixes
272 fixes
269 +++++
273 +++++
270
274
271 - fixed file browser bug, when switching into given form revision the url was
275 - fixed file browser bug, when switching into given form revision the url was
272 not changing
276 not changing
273 - fixed propagation to error controller on simplehg and simplegit middlewares
277 - fixed propagation to error controller on simplehg and simplegit middlewares
274 - fixed error when trying to make a download on empty repository
278 - fixed error when trying to make a download on empty repository
275 - fixed problem with '[' chars in commit messages in journal
279 - fixed problem with '[' chars in commit messages in journal
276 - fixed #99 Unicode errors, on file node paths with non utf-8 characters
280 - fixed #99 Unicode errors, on file node paths with non utf-8 characters
277 - journal fork fixes
281 - journal fork fixes
278 - removed issue with space inside renamed repository after deletion
282 - removed issue with space inside renamed repository after deletion
279 - fixed strange issue on formencode imports
283 - fixed strange issue on formencode imports
280 - fixed #126 Deleting repository on Windows, rename used incompatible chars.
284 - fixed #126 Deleting repository on Windows, rename used incompatible chars.
281 - #150 fixes for errors on repositories mapped in db but corrupted in
285 - #150 fixes for errors on repositories mapped in db but corrupted in
282 filesystem
286 filesystem
283 - fixed problem with ascendant characters in realm #181
287 - fixed problem with ascendant characters in realm #181
284 - fixed problem with sqlite file based database connection pool
288 - fixed problem with sqlite file based database connection pool
285 - whoosh indexer and code stats share the same dynamic extensions map
289 - whoosh indexer and code stats share the same dynamic extensions map
286 - fixes #188 - relationship delete of repo_to_perm entry on user removal
290 - fixes #188 - relationship delete of repo_to_perm entry on user removal
287 - fixes issue #189 Trending source files shows "show more" when no more exist
291 - fixes issue #189 Trending source files shows "show more" when no more exist
288 - fixes issue #197 Relative paths for pidlocks
292 - fixes issue #197 Relative paths for pidlocks
289 - fixes issue #198 password will require only 3 chars now for login form
293 - fixes issue #198 password will require only 3 chars now for login form
290 - fixes issue #199 wrong redirection for non admin users after creating a repository
294 - fixes issue #199 wrong redirection for non admin users after creating a repository
291 - fixes issues #202, bad db constraint made impossible to attach same group
295 - fixes issues #202, bad db constraint made impossible to attach same group
292 more than one time. Affects only mysql/postgres
296 more than one time. Affects only mysql/postgres
293 - fixes #218 os.kill patch for windows was missing sig param
297 - fixes #218 os.kill patch for windows was missing sig param
294 - improved rendering of dag (they are not trimmed anymore when number of
298 - improved rendering of dag (they are not trimmed anymore when number of
295 heads exceeds 5)
299 heads exceeds 5)
296
300
297 1.1.8 (**2011-04-12**)
301 1.1.8 (**2011-04-12**)
298 ----------------------
302 ----------------------
299
303
300 news
304 news
301 ++++
305 ++++
302
306
303 - improved windows support
307 - improved windows support
304
308
305 fixes
309 fixes
306 +++++
310 +++++
307
311
308 - fixed #140 freeze of python dateutil library, since new version is python2.x
312 - fixed #140 freeze of python dateutil library, since new version is python2.x
309 incompatible
313 incompatible
310 - setup-app will check for write permission in given path
314 - setup-app will check for write permission in given path
311 - cleaned up license info issue #149
315 - cleaned up license info issue #149
312 - fixes for issues #137,#116 and problems with unicode and accented characters.
316 - fixes for issues #137,#116 and problems with unicode and accented characters.
313 - fixes crashes on gravatar, when passed in email as unicode
317 - fixes crashes on gravatar, when passed in email as unicode
314 - fixed tooltip flickering problems
318 - fixed tooltip flickering problems
315 - fixed came_from redirection on windows
319 - fixed came_from redirection on windows
316 - fixed logging modules, and sql formatters
320 - fixed logging modules, and sql formatters
317 - windows fixes for os.kill issue #133
321 - windows fixes for os.kill issue #133
318 - fixes path splitting for windows issues #148
322 - fixes path splitting for windows issues #148
319 - fixed issue #143 wrong import on migration to 1.1.X
323 - fixed issue #143 wrong import on migration to 1.1.X
320 - fixed problems with displaying binary files, thanks to Thomas Waldmann
324 - fixed problems with displaying binary files, thanks to Thomas Waldmann
321 - removed name from archive files since it's breaking ui for long repo names
325 - removed name from archive files since it's breaking ui for long repo names
322 - fixed issue with archive headers sent to browser, thanks to Thomas Waldmann
326 - fixed issue with archive headers sent to browser, thanks to Thomas Waldmann
323 - fixed compatibility for 1024px displays, and larger dpi settings, thanks to
327 - fixed compatibility for 1024px displays, and larger dpi settings, thanks to
324 Thomas Waldmann
328 Thomas Waldmann
325 - fixed issue #166 summary pager was skipping 10 revisions on second page
329 - fixed issue #166 summary pager was skipping 10 revisions on second page
326
330
327
331
328 1.1.7 (**2011-03-23**)
332 1.1.7 (**2011-03-23**)
329 ----------------------
333 ----------------------
330
334
331 news
335 news
332 ++++
336 ++++
333
337
334 fixes
338 fixes
335 +++++
339 +++++
336
340
337 - fixed (again) #136 installation support for FreeBSD
341 - fixed (again) #136 installation support for FreeBSD
338
342
339
343
340 1.1.6 (**2011-03-21**)
344 1.1.6 (**2011-03-21**)
341 ----------------------
345 ----------------------
342
346
343 news
347 news
344 ++++
348 ++++
345
349
346 fixes
350 fixes
347 +++++
351 +++++
348
352
349 - fixed #136 installation support for FreeBSD
353 - fixed #136 installation support for FreeBSD
350 - RhodeCode will check for python version during installation
354 - RhodeCode will check for python version during installation
351
355
352 1.1.5 (**2011-03-17**)
356 1.1.5 (**2011-03-17**)
353 ----------------------
357 ----------------------
354
358
355 news
359 news
356 ++++
360 ++++
357
361
358 - basic windows support, by exchanging pybcrypt into sha256 for windows only
362 - basic windows support, by exchanging pybcrypt into sha256 for windows only
359 highly inspired by idea of mantis406
363 highly inspired by idea of mantis406
360
364
361 fixes
365 fixes
362 +++++
366 +++++
363
367
364 - fixed sorting by author in main page
368 - fixed sorting by author in main page
365 - fixed crashes with diffs on binary files
369 - fixed crashes with diffs on binary files
366 - fixed #131 problem with boolean values for LDAP
370 - fixed #131 problem with boolean values for LDAP
367 - fixed #122 mysql problems thanks to striker69
371 - fixed #122 mysql problems thanks to striker69
368 - fixed problem with errors on calling raw/raw_files/annotate functions
372 - fixed problem with errors on calling raw/raw_files/annotate functions
369 with unknown revisions
373 with unknown revisions
370 - fixed returned rawfiles attachment names with international character
374 - fixed returned rawfiles attachment names with international character
371 - cleaned out docs, big thanks to Jason Harris
375 - cleaned out docs, big thanks to Jason Harris
372
376
373 1.1.4 (**2011-02-19**)
377 1.1.4 (**2011-02-19**)
374 ----------------------
378 ----------------------
375
379
376 news
380 news
377 ++++
381 ++++
378
382
379 fixes
383 fixes
380 +++++
384 +++++
381
385
382 - fixed formencode import problem on settings page, that caused server crash
386 - fixed formencode import problem on settings page, that caused server crash
383 when that page was accessed as first after server start
387 when that page was accessed as first after server start
384 - journal fixes
388 - journal fixes
385 - fixed option to access repository just by entering http://server/<repo_name>
389 - fixed option to access repository just by entering http://server/<repo_name>
386
390
387 1.1.3 (**2011-02-16**)
391 1.1.3 (**2011-02-16**)
388 ----------------------
392 ----------------------
389
393
390 news
394 news
391 ++++
395 ++++
392
396
393 - implemented #102 allowing the '.' character in username
397 - implemented #102 allowing the '.' character in username
394 - added option to access repository just by entering http://server/<repo_name>
398 - added option to access repository just by entering http://server/<repo_name>
395 - celery task ignores result for better performance
399 - celery task ignores result for better performance
396
400
397 fixes
401 fixes
398 +++++
402 +++++
399
403
400 - fixed ehlo command and non auth mail servers on smtp_lib. Thanks to
404 - fixed ehlo command and non auth mail servers on smtp_lib. Thanks to
401 apollo13 and Johan Walles
405 apollo13 and Johan Walles
402 - small fixes in journal
406 - small fixes in journal
403 - fixed problems with getting setting for celery from .ini files
407 - fixed problems with getting setting for celery from .ini files
404 - registration, password reset and login boxes share the same title as main
408 - registration, password reset and login boxes share the same title as main
405 application now
409 application now
406 - fixed #113: to high permissions to fork repository
410 - fixed #113: to high permissions to fork repository
407 - fixed problem with '[' chars in commit messages in journal
411 - fixed problem with '[' chars in commit messages in journal
408 - removed issue with space inside renamed repository after deletion
412 - removed issue with space inside renamed repository after deletion
409 - db transaction fixes when filesystem repository creation failed
413 - db transaction fixes when filesystem repository creation failed
410 - fixed #106 relation issues on databases different than sqlite
414 - fixed #106 relation issues on databases different than sqlite
411 - fixed static files paths links to use of url() method
415 - fixed static files paths links to use of url() method
412
416
413 1.1.2 (**2011-01-12**)
417 1.1.2 (**2011-01-12**)
414 ----------------------
418 ----------------------
415
419
416 news
420 news
417 ++++
421 ++++
418
422
419
423
420 fixes
424 fixes
421 +++++
425 +++++
422
426
423 - fixes #98 protection against float division of percentage stats
427 - fixes #98 protection against float division of percentage stats
424 - fixed graph bug
428 - fixed graph bug
425 - forced webhelpers version since it was making troubles during installation
429 - forced webhelpers version since it was making troubles during installation
426
430
427 1.1.1 (**2011-01-06**)
431 1.1.1 (**2011-01-06**)
428 ----------------------
432 ----------------------
429
433
430 news
434 news
431 ++++
435 ++++
432
436
433 - added force https option into ini files for easier https usage (no need to
437 - added force https option into ini files for easier https usage (no need to
434 set server headers with this options)
438 set server headers with this options)
435 - small css updates
439 - small css updates
436
440
437 fixes
441 fixes
438 +++++
442 +++++
439
443
440 - fixed #96 redirect loop on files view on repositories without changesets
444 - fixed #96 redirect loop on files view on repositories without changesets
441 - fixed #97 unicode string passed into server header in special cases (mod_wsgi)
445 - fixed #97 unicode string passed into server header in special cases (mod_wsgi)
442 and server crashed with errors
446 and server crashed with errors
443 - fixed large tooltips problems on main page
447 - fixed large tooltips problems on main page
444 - fixed #92 whoosh indexer is more error proof
448 - fixed #92 whoosh indexer is more error proof
445
449
446 1.1.0 (**2010-12-18**)
450 1.1.0 (**2010-12-18**)
447 ----------------------
451 ----------------------
448
452
449 news
453 news
450 ++++
454 ++++
451
455
452 - rewrite of internals for vcs >=0.1.10
456 - rewrite of internals for vcs >=0.1.10
453 - uses mercurial 1.7 with dotencode disabled for maintaining compatibility
457 - uses mercurial 1.7 with dotencode disabled for maintaining compatibility
454 with older clients
458 with older clients
455 - anonymous access, authentication via ldap
459 - anonymous access, authentication via ldap
456 - performance upgrade for cached repos list - each repository has its own
460 - performance upgrade for cached repos list - each repository has its own
457 cache that's invalidated when needed.
461 cache that's invalidated when needed.
458 - performance upgrades on repositories with large amount of commits (20K+)
462 - performance upgrades on repositories with large amount of commits (20K+)
459 - main page quick filter for filtering repositories
463 - main page quick filter for filtering repositories
460 - user dashboards with ability to follow chosen repositories actions
464 - user dashboards with ability to follow chosen repositories actions
461 - sends email to admin on new user registration
465 - sends email to admin on new user registration
462 - added cache/statistics reset options into repository settings
466 - added cache/statistics reset options into repository settings
463 - more detailed action logger (based on hooks) with pushed changesets lists
467 - more detailed action logger (based on hooks) with pushed changesets lists
464 and options to disable those hooks from admin panel
468 and options to disable those hooks from admin panel
465 - introduced new enhanced changelog for merges that shows more accurate results
469 - introduced new enhanced changelog for merges that shows more accurate results
466 - new improved and faster code stats (based on pygments lexers mapping tables,
470 - new improved and faster code stats (based on pygments lexers mapping tables,
467 showing up to 10 trending sources for each repository. Additionally stats
471 showing up to 10 trending sources for each repository. Additionally stats
468 can be disabled in repository settings.
472 can be disabled in repository settings.
469 - gui optimizations, fixed application width to 1024px
473 - gui optimizations, fixed application width to 1024px
470 - added cut off (for large files/changesets) limit into config files
474 - added cut off (for large files/changesets) limit into config files
471 - whoosh, celeryd, upgrade moved to paster command
475 - whoosh, celeryd, upgrade moved to paster command
472 - other than sqlite database backends can be used
476 - other than sqlite database backends can be used
473
477
474 fixes
478 fixes
475 +++++
479 +++++
476
480
477 - fixes #61 forked repo was showing only after cache expired
481 - fixes #61 forked repo was showing only after cache expired
478 - fixes #76 no confirmation on user deletes
482 - fixes #76 no confirmation on user deletes
479 - fixes #66 Name field misspelled
483 - fixes #66 Name field misspelled
480 - fixes #72 block user removal when he owns repositories
484 - fixes #72 block user removal when he owns repositories
481 - fixes #69 added password confirmation fields
485 - fixes #69 added password confirmation fields
482 - fixes #87 RhodeCode crashes occasionally on updating repository owner
486 - fixes #87 RhodeCode crashes occasionally on updating repository owner
483 - fixes #82 broken annotations on files with more than 1 blank line at the end
487 - fixes #82 broken annotations on files with more than 1 blank line at the end
484 - a lot of fixes and tweaks for file browser
488 - a lot of fixes and tweaks for file browser
485 - fixed detached session issues
489 - fixed detached session issues
486 - fixed when user had no repos he would see all repos listed in my account
490 - fixed when user had no repos he would see all repos listed in my account
487 - fixed ui() instance bug when global hgrc settings was loaded for server
491 - fixed ui() instance bug when global hgrc settings was loaded for server
488 instance and all hgrc options were merged with our db ui() object
492 instance and all hgrc options were merged with our db ui() object
489 - numerous small bugfixes
493 - numerous small bugfixes
490
494
491 (special thanks for TkSoh for detailed feedback)
495 (special thanks for TkSoh for detailed feedback)
492
496
493
497
494 1.0.2 (**2010-11-12**)
498 1.0.2 (**2010-11-12**)
495 ----------------------
499 ----------------------
496
500
497 news
501 news
498 ++++
502 ++++
499
503
500 - tested under python2.7
504 - tested under python2.7
501 - bumped sqlalchemy and celery versions
505 - bumped sqlalchemy and celery versions
502
506
503 fixes
507 fixes
504 +++++
508 +++++
505
509
506 - fixed #59 missing graph.js
510 - fixed #59 missing graph.js
507 - fixed repo_size crash when repository had broken symlinks
511 - fixed repo_size crash when repository had broken symlinks
508 - fixed python2.5 crashes.
512 - fixed python2.5 crashes.
509
513
510
514
511 1.0.1 (**2010-11-10**)
515 1.0.1 (**2010-11-10**)
512 ----------------------
516 ----------------------
513
517
514 news
518 news
515 ++++
519 ++++
516
520
517 - small css updated
521 - small css updated
518
522
519 fixes
523 fixes
520 +++++
524 +++++
521
525
522 - fixed #53 python2.5 incompatible enumerate calls
526 - fixed #53 python2.5 incompatible enumerate calls
523 - fixed #52 disable mercurial extension for web
527 - fixed #52 disable mercurial extension for web
524 - fixed #51 deleting repositories don't delete it's dependent objects
528 - fixed #51 deleting repositories don't delete it's dependent objects
525
529
526
530
527 1.0.0 (**2010-11-02**)
531 1.0.0 (**2010-11-02**)
528 ----------------------
532 ----------------------
529
533
530 - security bugfix simplehg wasn't checking for permissions on commands
534 - security bugfix simplehg wasn't checking for permissions on commands
531 other than pull or push.
535 other than pull or push.
532 - fixed doubled messages after push or pull in admin journal
536 - fixed doubled messages after push or pull in admin journal
533 - templating and css corrections, fixed repo switcher on chrome, updated titles
537 - templating and css corrections, fixed repo switcher on chrome, updated titles
534 - admin menu accessible from options menu on repository view
538 - admin menu accessible from options menu on repository view
535 - permissions cached queries
539 - permissions cached queries
536
540
537 1.0.0rc4 (**2010-10-12**)
541 1.0.0rc4 (**2010-10-12**)
538 --------------------------
542 --------------------------
539
543
540 - fixed python2.5 missing simplejson imports (thanks to Jens BΓ€ckman)
544 - fixed python2.5 missing simplejson imports (thanks to Jens BΓ€ckman)
541 - removed cache_manager settings from sqlalchemy meta
545 - removed cache_manager settings from sqlalchemy meta
542 - added sqlalchemy cache settings to ini files
546 - added sqlalchemy cache settings to ini files
543 - validated password length and added second try of failure on paster setup-app
547 - validated password length and added second try of failure on paster setup-app
544 - fixed setup database destroy prompt even when there was no db
548 - fixed setup database destroy prompt even when there was no db
545
549
546
550
547 1.0.0rc3 (**2010-10-11**)
551 1.0.0rc3 (**2010-10-11**)
548 -------------------------
552 -------------------------
549
553
550 - fixed i18n during installation.
554 - fixed i18n during installation.
551
555
552 1.0.0rc2 (**2010-10-11**)
556 1.0.0rc2 (**2010-10-11**)
553 -------------------------
557 -------------------------
554
558
555 - Disabled dirsize in file browser, it's causing nasty bug when dir renames
559 - Disabled dirsize in file browser, it's causing nasty bug when dir renames
556 occure. After vcs is fixed it'll be put back again.
560 occure. After vcs is fixed it'll be put back again.
557 - templating/css rewrites, optimized css. No newline at end of file
561 - templating/css rewrites, optimized css.
@@ -1,414 +1,414 b''
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2 """
2 """
3 rhodecode.controllers.admin.settings
3 rhodecode.controllers.admin.settings
4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5
5
6 settings controller for rhodecode admin
6 settings controller for rhodecode admin
7
7
8 :created_on: Jul 14, 2010
8 :created_on: Jul 14, 2010
9 :author: marcink
9 :author: marcink
10 :copyright: (C) 2010-2012 Marcin Kuzminski <marcin@python-works.com>
10 :copyright: (C) 2010-2012 Marcin Kuzminski <marcin@python-works.com>
11 :license: GPLv3, see COPYING for more details.
11 :license: GPLv3, see COPYING for more details.
12 """
12 """
13 # This program is free software: you can redistribute it and/or modify
13 # This program is free software: you can redistribute it and/or modify
14 # it under the terms of the GNU General Public License as published by
14 # it under the terms of the GNU General Public License as published by
15 # the Free Software Foundation, either version 3 of the License, or
15 # the Free Software Foundation, either version 3 of the License, or
16 # (at your option) any later version.
16 # (at your option) any later version.
17 #
17 #
18 # This program is distributed in the hope that it will be useful,
18 # This program is distributed in the hope that it will be useful,
19 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # but WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 # GNU General Public License for more details.
21 # GNU General Public License for more details.
22 #
22 #
23 # You should have received a copy of the GNU General Public License
23 # You should have received a copy of the GNU General Public License
24 # along with this program. If not, see <http://www.gnu.org/licenses/>.
24 # along with this program. If not, see <http://www.gnu.org/licenses/>.
25
25
26 import logging
26 import logging
27 import traceback
27 import traceback
28 import formencode
28 import formencode
29
29
30 from sqlalchemy import func
30 from sqlalchemy import func
31 from formencode import htmlfill
31 from formencode import htmlfill
32 from pylons import request, session, tmpl_context as c, url, config
32 from pylons import request, session, tmpl_context as c, url, config
33 from pylons.controllers.util import abort, redirect
33 from pylons.controllers.util import abort, redirect
34 from pylons.i18n.translation import _
34 from pylons.i18n.translation import _
35
35
36 from rhodecode.lib import helpers as h
36 from rhodecode.lib import helpers as h
37 from rhodecode.lib.auth import LoginRequired, HasPermissionAllDecorator, \
37 from rhodecode.lib.auth import LoginRequired, HasPermissionAllDecorator, \
38 HasPermissionAnyDecorator, NotAnonymous
38 HasPermissionAnyDecorator, NotAnonymous
39 from rhodecode.lib.base import BaseController, render
39 from rhodecode.lib.base import BaseController, render
40 from rhodecode.lib.celerylib import tasks, run_task
40 from rhodecode.lib.celerylib import tasks, run_task
41 from rhodecode.lib.utils import repo2db_mapper, invalidate_cache, \
41 from rhodecode.lib.utils import repo2db_mapper, invalidate_cache, \
42 set_rhodecode_config, repo_name_slug
42 set_rhodecode_config, repo_name_slug
43 from rhodecode.model.db import RhodeCodeUi, Repository, RepoGroup, \
43 from rhodecode.model.db import RhodeCodeUi, Repository, RepoGroup, \
44 RhodeCodeSetting
44 RhodeCodeSetting
45 from rhodecode.model.forms import UserForm, ApplicationSettingsForm, \
45 from rhodecode.model.forms import UserForm, ApplicationSettingsForm, \
46 ApplicationUiSettingsForm
46 ApplicationUiSettingsForm
47 from rhodecode.model.scm import ScmModel
47 from rhodecode.model.scm import ScmModel
48 from rhodecode.model.user import UserModel
48 from rhodecode.model.user import UserModel
49 from rhodecode.model.db import User
49 from rhodecode.model.db import User
50 from rhodecode.model.notification import EmailNotificationModel
50 from rhodecode.model.notification import EmailNotificationModel
51 from rhodecode.model.meta import Session
51 from rhodecode.model.meta import Session
52
52
53 log = logging.getLogger(__name__)
53 log = logging.getLogger(__name__)
54
54
55
55
56 class SettingsController(BaseController):
56 class SettingsController(BaseController):
57 """REST Controller styled on the Atom Publishing Protocol"""
57 """REST Controller styled on the Atom Publishing Protocol"""
58 # To properly map this controller, ensure your config/routing.py
58 # To properly map this controller, ensure your config/routing.py
59 # file has a resource setup:
59 # file has a resource setup:
60 # map.resource('setting', 'settings', controller='admin/settings',
60 # map.resource('setting', 'settings', controller='admin/settings',
61 # path_prefix='/admin', name_prefix='admin_')
61 # path_prefix='/admin', name_prefix='admin_')
62
62
63 @LoginRequired()
63 @LoginRequired()
64 def __before__(self):
64 def __before__(self):
65 c.admin_user = session.get('admin_user')
65 c.admin_user = session.get('admin_user')
66 c.admin_username = session.get('admin_username')
66 c.admin_username = session.get('admin_username')
67 super(SettingsController, self).__before__()
67 super(SettingsController, self).__before__()
68
68
69 @HasPermissionAllDecorator('hg.admin')
69 @HasPermissionAllDecorator('hg.admin')
70 def index(self, format='html'):
70 def index(self, format='html'):
71 """GET /admin/settings: All items in the collection"""
71 """GET /admin/settings: All items in the collection"""
72 # url('admin_settings')
72 # url('admin_settings')
73
73
74 defaults = RhodeCodeSetting.get_app_settings()
74 defaults = RhodeCodeSetting.get_app_settings()
75 defaults.update(self.get_hg_ui_settings())
75 defaults.update(self.get_hg_ui_settings())
76 return htmlfill.render(
76 return htmlfill.render(
77 render('admin/settings/settings.html'),
77 render('admin/settings/settings.html'),
78 defaults=defaults,
78 defaults=defaults,
79 encoding="UTF-8",
79 encoding="UTF-8",
80 force_defaults=False
80 force_defaults=False
81 )
81 )
82
82
83 @HasPermissionAllDecorator('hg.admin')
83 @HasPermissionAllDecorator('hg.admin')
84 def create(self):
84 def create(self):
85 """POST /admin/settings: Create a new item"""
85 """POST /admin/settings: Create a new item"""
86 # url('admin_settings')
86 # url('admin_settings')
87
87
88 @HasPermissionAllDecorator('hg.admin')
88 @HasPermissionAllDecorator('hg.admin')
89 def new(self, format='html'):
89 def new(self, format='html'):
90 """GET /admin/settings/new: Form to create a new item"""
90 """GET /admin/settings/new: Form to create a new item"""
91 # url('admin_new_setting')
91 # url('admin_new_setting')
92
92
93 @HasPermissionAllDecorator('hg.admin')
93 @HasPermissionAllDecorator('hg.admin')
94 def update(self, setting_id):
94 def update(self, setting_id):
95 """PUT /admin/settings/setting_id: Update an existing item"""
95 """PUT /admin/settings/setting_id: Update an existing item"""
96 # Forms posted to this method should contain a hidden field:
96 # Forms posted to this method should contain a hidden field:
97 # <input type="hidden" name="_method" value="PUT" />
97 # <input type="hidden" name="_method" value="PUT" />
98 # Or using helpers:
98 # Or using helpers:
99 # h.form(url('admin_setting', setting_id=ID),
99 # h.form(url('admin_setting', setting_id=ID),
100 # method='put')
100 # method='put')
101 # url('admin_setting', setting_id=ID)
101 # url('admin_setting', setting_id=ID)
102 if setting_id == 'mapping':
102 if setting_id == 'mapping':
103 rm_obsolete = request.POST.get('destroy', False)
103 rm_obsolete = request.POST.get('destroy', False)
104 log.debug('Rescanning directories with destroy=%s' % rm_obsolete)
104 log.debug('Rescanning directories with destroy=%s' % rm_obsolete)
105 initial = ScmModel().repo_scan()
105 initial = ScmModel().repo_scan()
106 log.debug('invalidating all repositories')
106 log.debug('invalidating all repositories')
107 for repo_name in initial.keys():
107 for repo_name in initial.keys():
108 invalidate_cache('get_repo_cached_%s' % repo_name)
108 invalidate_cache('get_repo_cached_%s' % repo_name)
109
109
110 added, removed = repo2db_mapper(initial, rm_obsolete)
110 added, removed = repo2db_mapper(initial, rm_obsolete)
111
111
112 h.flash(_('Repositories successfully'
112 h.flash(_('Repositories successfully'
113 ' rescanned added: %s,removed: %s') % (added, removed),
113 ' rescanned added: %s,removed: %s') % (added, removed),
114 category='success')
114 category='success')
115
115
116 if setting_id == 'whoosh':
116 if setting_id == 'whoosh':
117 repo_location = self.get_hg_ui_settings()['paths_root_path']
117 repo_location = self.get_hg_ui_settings()['paths_root_path']
118 full_index = request.POST.get('full_index', False)
118 full_index = request.POST.get('full_index', False)
119 run_task(tasks.whoosh_index, repo_location, full_index)
119 run_task(tasks.whoosh_index, repo_location, full_index)
120
120
121 h.flash(_('Whoosh reindex task scheduled'), category='success')
121 h.flash(_('Whoosh reindex task scheduled'), category='success')
122 if setting_id == 'global':
122 if setting_id == 'global':
123
123
124 application_form = ApplicationSettingsForm()()
124 application_form = ApplicationSettingsForm()()
125 try:
125 try:
126 form_result = application_form.to_python(dict(request.POST))
126 form_result = application_form.to_python(dict(request.POST))
127
127
128 try:
128 try:
129 hgsettings1 = RhodeCodeSetting.get_by_name('title')
129 hgsettings1 = RhodeCodeSetting.get_by_name('title')
130 hgsettings1.app_settings_value = \
130 hgsettings1.app_settings_value = \
131 form_result['rhodecode_title']
131 form_result['rhodecode_title']
132
132
133 hgsettings2 = RhodeCodeSetting.get_by_name('realm')
133 hgsettings2 = RhodeCodeSetting.get_by_name('realm')
134 hgsettings2.app_settings_value = \
134 hgsettings2.app_settings_value = \
135 form_result['rhodecode_realm']
135 form_result['rhodecode_realm']
136
136
137 hgsettings3 = RhodeCodeSetting.get_by_name('ga_code')
137 hgsettings3 = RhodeCodeSetting.get_by_name('ga_code')
138 hgsettings3.app_settings_value = \
138 hgsettings3.app_settings_value = \
139 form_result['rhodecode_ga_code']
139 form_result['rhodecode_ga_code']
140
140
141 self.sa.add(hgsettings1)
141 self.sa.add(hgsettings1)
142 self.sa.add(hgsettings2)
142 self.sa.add(hgsettings2)
143 self.sa.add(hgsettings3)
143 self.sa.add(hgsettings3)
144 self.sa.commit()
144 self.sa.commit()
145 set_rhodecode_config(config)
145 set_rhodecode_config(config)
146 h.flash(_('Updated application settings'),
146 h.flash(_('Updated application settings'),
147 category='success')
147 category='success')
148
148
149 except Exception:
149 except Exception:
150 log.error(traceback.format_exc())
150 log.error(traceback.format_exc())
151 h.flash(_('error occurred during updating '
151 h.flash(_('error occurred during updating '
152 'application settings'),
152 'application settings'),
153 category='error')
153 category='error')
154
154
155 self.sa.rollback()
155 self.sa.rollback()
156
156
157 except formencode.Invalid, errors:
157 except formencode.Invalid, errors:
158 return htmlfill.render(
158 return htmlfill.render(
159 render('admin/settings/settings.html'),
159 render('admin/settings/settings.html'),
160 defaults=errors.value,
160 defaults=errors.value,
161 errors=errors.error_dict or {},
161 errors=errors.error_dict or {},
162 prefix_error=False,
162 prefix_error=False,
163 encoding="UTF-8")
163 encoding="UTF-8")
164
164
165 if setting_id == 'mercurial':
165 if setting_id == 'mercurial':
166 application_form = ApplicationUiSettingsForm()()
166 application_form = ApplicationUiSettingsForm()()
167 try:
167 try:
168 form_result = application_form.to_python(dict(request.POST))
168 form_result = application_form.to_python(dict(request.POST))
169
169
170 try:
170 try:
171
171
172 hgsettings1 = self.sa.query(RhodeCodeUi)\
172 hgsettings1 = self.sa.query(RhodeCodeUi)\
173 .filter(RhodeCodeUi.ui_key == 'push_ssl').one()
173 .filter(RhodeCodeUi.ui_key == 'push_ssl').one()
174 hgsettings1.ui_value = form_result['web_push_ssl']
174 hgsettings1.ui_value = form_result['web_push_ssl']
175
175
176 hgsettings2 = self.sa.query(RhodeCodeUi)\
176 hgsettings2 = self.sa.query(RhodeCodeUi)\
177 .filter(RhodeCodeUi.ui_key == '/').one()
177 .filter(RhodeCodeUi.ui_key == '/').one()
178 hgsettings2.ui_value = form_result['paths_root_path']
178 hgsettings2.ui_value = form_result['paths_root_path']
179
179
180 #HOOKS
180 #HOOKS
181 hgsettings3 = self.sa.query(RhodeCodeUi)\
181 hgsettings3 = self.sa.query(RhodeCodeUi)\
182 .filter(RhodeCodeUi.ui_key == 'changegroup.update').one()
182 .filter(RhodeCodeUi.ui_key == 'changegroup.update').one()
183 hgsettings3.ui_active = \
183 hgsettings3.ui_active = \
184 bool(form_result['hooks_changegroup_update'])
184 bool(form_result['hooks_changegroup_update'])
185
185
186 hgsettings4 = self.sa.query(RhodeCodeUi)\
186 hgsettings4 = self.sa.query(RhodeCodeUi)\
187 .filter(RhodeCodeUi.ui_key ==
187 .filter(RhodeCodeUi.ui_key ==
188 'changegroup.repo_size').one()
188 'changegroup.repo_size').one()
189 hgsettings4.ui_active = \
189 hgsettings4.ui_active = \
190 bool(form_result['hooks_changegroup_repo_size'])
190 bool(form_result['hooks_changegroup_repo_size'])
191
191
192 hgsettings5 = self.sa.query(RhodeCodeUi)\
192 hgsettings5 = self.sa.query(RhodeCodeUi)\
193 .filter(RhodeCodeUi.ui_key ==
193 .filter(RhodeCodeUi.ui_key ==
194 'pretxnchangegroup.push_logger').one()
194 'pretxnchangegroup.push_logger').one()
195 hgsettings5.ui_active = \
195 hgsettings5.ui_active = \
196 bool(form_result['hooks_pretxnchangegroup'
196 bool(form_result['hooks_pretxnchangegroup'
197 '_push_logger'])
197 '_push_logger'])
198
198
199 hgsettings6 = self.sa.query(RhodeCodeUi)\
199 hgsettings6 = self.sa.query(RhodeCodeUi)\
200 .filter(RhodeCodeUi.ui_key ==
200 .filter(RhodeCodeUi.ui_key ==
201 'preoutgoing.pull_logger').one()
201 'preoutgoing.pull_logger').one()
202 hgsettings6.ui_active = \
202 hgsettings6.ui_active = \
203 bool(form_result['hooks_preoutgoing_pull_logger'])
203 bool(form_result['hooks_preoutgoing_pull_logger'])
204
204
205 self.sa.add(hgsettings1)
205 self.sa.add(hgsettings1)
206 self.sa.add(hgsettings2)
206 self.sa.add(hgsettings2)
207 self.sa.add(hgsettings3)
207 self.sa.add(hgsettings3)
208 self.sa.add(hgsettings4)
208 self.sa.add(hgsettings4)
209 self.sa.add(hgsettings5)
209 self.sa.add(hgsettings5)
210 self.sa.add(hgsettings6)
210 self.sa.add(hgsettings6)
211 self.sa.commit()
211 self.sa.commit()
212
212
213 h.flash(_('Updated mercurial settings'),
213 h.flash(_('Updated mercurial settings'),
214 category='success')
214 category='success')
215
215
216 except:
216 except:
217 log.error(traceback.format_exc())
217 log.error(traceback.format_exc())
218 h.flash(_('error occurred during updating '
218 h.flash(_('error occurred during updating '
219 'application settings'), category='error')
219 'application settings'), category='error')
220
220
221 self.sa.rollback()
221 self.sa.rollback()
222
222
223 except formencode.Invalid, errors:
223 except formencode.Invalid, errors:
224 return htmlfill.render(
224 return htmlfill.render(
225 render('admin/settings/settings.html'),
225 render('admin/settings/settings.html'),
226 defaults=errors.value,
226 defaults=errors.value,
227 errors=errors.error_dict or {},
227 errors=errors.error_dict or {},
228 prefix_error=False,
228 prefix_error=False,
229 encoding="UTF-8")
229 encoding="UTF-8")
230
230
231 if setting_id == 'hooks':
231 if setting_id == 'hooks':
232 ui_key = request.POST.get('new_hook_ui_key')
232 ui_key = request.POST.get('new_hook_ui_key')
233 ui_value = request.POST.get('new_hook_ui_value')
233 ui_value = request.POST.get('new_hook_ui_value')
234 try:
234 try:
235
235
236 if ui_value and ui_key:
236 if ui_value and ui_key:
237 RhodeCodeUi.create_or_update_hook(ui_key, ui_value)
237 RhodeCodeUi.create_or_update_hook(ui_key, ui_value)
238 h.flash(_('Added new hook'),
238 h.flash(_('Added new hook'),
239 category='success')
239 category='success')
240
240
241 # check for edits
241 # check for edits
242 update = False
242 update = False
243 _d = request.POST.dict_of_lists()
243 _d = request.POST.dict_of_lists()
244 for k, v in zip(_d.get('hook_ui_key', []),
244 for k, v in zip(_d.get('hook_ui_key', []),
245 _d.get('hook_ui_value_new', [])):
245 _d.get('hook_ui_value_new', [])):
246 RhodeCodeUi.create_or_update_hook(k, v)
246 RhodeCodeUi.create_or_update_hook(k, v)
247 update = True
247 update = True
248
248
249 if update:
249 if update:
250 h.flash(_('Updated hooks'), category='success')
250 h.flash(_('Updated hooks'), category='success')
251 Session.commit()
251 self.sa.commit()
252 except:
252 except:
253 log.error(traceback.format_exc())
253 log.error(traceback.format_exc())
254 h.flash(_('error occurred during hook creation'),
254 h.flash(_('error occurred during hook creation'),
255 category='error')
255 category='error')
256
256
257 return redirect(url('admin_edit_setting', setting_id='hooks'))
257 return redirect(url('admin_edit_setting', setting_id='hooks'))
258
258
259 if setting_id == 'email':
259 if setting_id == 'email':
260 test_email = request.POST.get('test_email')
260 test_email = request.POST.get('test_email')
261 test_email_subj = 'RhodeCode TestEmail'
261 test_email_subj = 'RhodeCode TestEmail'
262 test_email_body = 'RhodeCode Email test'
262 test_email_body = 'RhodeCode Email test'
263
263
264 test_email_html_body = EmailNotificationModel()\
264 test_email_html_body = EmailNotificationModel()\
265 .get_email_tmpl(EmailNotificationModel.TYPE_DEFAULT,
265 .get_email_tmpl(EmailNotificationModel.TYPE_DEFAULT,
266 body=test_email_body)
266 body=test_email_body)
267
267
268 recipients = [test_email] if [test_email] else None
268 recipients = [test_email] if [test_email] else None
269
269
270 run_task(tasks.send_email, recipients, test_email_subj,
270 run_task(tasks.send_email, recipients, test_email_subj,
271 test_email_body, test_email_html_body)
271 test_email_body, test_email_html_body)
272
272
273 h.flash(_('Email task created'), category='success')
273 h.flash(_('Email task created'), category='success')
274 return redirect(url('admin_settings'))
274 return redirect(url('admin_settings'))
275
275
276 @HasPermissionAllDecorator('hg.admin')
276 @HasPermissionAllDecorator('hg.admin')
277 def delete(self, setting_id):
277 def delete(self, setting_id):
278 """DELETE /admin/settings/setting_id: Delete an existing item"""
278 """DELETE /admin/settings/setting_id: Delete an existing item"""
279 # Forms posted to this method should contain a hidden field:
279 # Forms posted to this method should contain a hidden field:
280 # <input type="hidden" name="_method" value="DELETE" />
280 # <input type="hidden" name="_method" value="DELETE" />
281 # Or using helpers:
281 # Or using helpers:
282 # h.form(url('admin_setting', setting_id=ID),
282 # h.form(url('admin_setting', setting_id=ID),
283 # method='delete')
283 # method='delete')
284 # url('admin_setting', setting_id=ID)
284 # url('admin_setting', setting_id=ID)
285 if setting_id == 'hooks':
285 if setting_id == 'hooks':
286 hook_id = request.POST.get('hook_id')
286 hook_id = request.POST.get('hook_id')
287 RhodeCodeUi.delete(hook_id)
287 RhodeCodeUi.delete(hook_id)
288
288 self.sa.commit()
289
289
290 @HasPermissionAllDecorator('hg.admin')
290 @HasPermissionAllDecorator('hg.admin')
291 def show(self, setting_id, format='html'):
291 def show(self, setting_id, format='html'):
292 """
292 """
293 GET /admin/settings/setting_id: Show a specific item"""
293 GET /admin/settings/setting_id: Show a specific item"""
294 # url('admin_setting', setting_id=ID)
294 # url('admin_setting', setting_id=ID)
295
295
296 @HasPermissionAllDecorator('hg.admin')
296 @HasPermissionAllDecorator('hg.admin')
297 def edit(self, setting_id, format='html'):
297 def edit(self, setting_id, format='html'):
298 """
298 """
299 GET /admin/settings/setting_id/edit: Form to
299 GET /admin/settings/setting_id/edit: Form to
300 edit an existing item"""
300 edit an existing item"""
301 # url('admin_edit_setting', setting_id=ID)
301 # url('admin_edit_setting', setting_id=ID)
302
302
303 c.hooks = RhodeCodeUi.get_builtin_hooks()
303 c.hooks = RhodeCodeUi.get_builtin_hooks()
304 c.custom_hooks = RhodeCodeUi.get_custom_hooks()
304 c.custom_hooks = RhodeCodeUi.get_custom_hooks()
305
305
306 return htmlfill.render(
306 return htmlfill.render(
307 render('admin/settings/hooks.html'),
307 render('admin/settings/hooks.html'),
308 defaults={},
308 defaults={},
309 encoding="UTF-8",
309 encoding="UTF-8",
310 force_defaults=False
310 force_defaults=False
311 )
311 )
312
312
313 @NotAnonymous()
313 @NotAnonymous()
314 def my_account(self):
314 def my_account(self):
315 """
315 """
316 GET /_admin/my_account Displays info about my account
316 GET /_admin/my_account Displays info about my account
317 """
317 """
318 # url('admin_settings_my_account')
318 # url('admin_settings_my_account')
319
319
320 c.user = User.get(self.rhodecode_user.user_id)
320 c.user = User.get(self.rhodecode_user.user_id)
321 all_repos = self.sa.query(Repository)\
321 all_repos = self.sa.query(Repository)\
322 .filter(Repository.user_id == c.user.user_id)\
322 .filter(Repository.user_id == c.user.user_id)\
323 .order_by(func.lower(Repository.repo_name)).all()
323 .order_by(func.lower(Repository.repo_name)).all()
324
324
325 c.user_repos = ScmModel().get_repos(all_repos)
325 c.user_repos = ScmModel().get_repos(all_repos)
326
326
327 if c.user.username == 'default':
327 if c.user.username == 'default':
328 h.flash(_("You can't edit this user since it's"
328 h.flash(_("You can't edit this user since it's"
329 " crucial for entire application"), category='warning')
329 " crucial for entire application"), category='warning')
330 return redirect(url('users'))
330 return redirect(url('users'))
331
331
332 defaults = c.user.get_dict()
332 defaults = c.user.get_dict()
333 return htmlfill.render(
333 return htmlfill.render(
334 render('admin/users/user_edit_my_account.html'),
334 render('admin/users/user_edit_my_account.html'),
335 defaults=defaults,
335 defaults=defaults,
336 encoding="UTF-8",
336 encoding="UTF-8",
337 force_defaults=False
337 force_defaults=False
338 )
338 )
339
339
340 def my_account_update(self):
340 def my_account_update(self):
341 """PUT /_admin/my_account_update: Update an existing item"""
341 """PUT /_admin/my_account_update: Update an existing item"""
342 # Forms posted to this method should contain a hidden field:
342 # Forms posted to this method should contain a hidden field:
343 # <input type="hidden" name="_method" value="PUT" />
343 # <input type="hidden" name="_method" value="PUT" />
344 # Or using helpers:
344 # Or using helpers:
345 # h.form(url('admin_settings_my_account_update'),
345 # h.form(url('admin_settings_my_account_update'),
346 # method='put')
346 # method='put')
347 # url('admin_settings_my_account_update', id=ID)
347 # url('admin_settings_my_account_update', id=ID)
348 user_model = UserModel()
348 user_model = UserModel()
349 uid = self.rhodecode_user.user_id
349 uid = self.rhodecode_user.user_id
350 _form = UserForm(edit=True,
350 _form = UserForm(edit=True,
351 old_data={'user_id': uid,
351 old_data={'user_id': uid,
352 'email': self.rhodecode_user.email})()
352 'email': self.rhodecode_user.email})()
353 form_result = {}
353 form_result = {}
354 try:
354 try:
355 form_result = _form.to_python(dict(request.POST))
355 form_result = _form.to_python(dict(request.POST))
356 user_model.update_my_account(uid, form_result)
356 user_model.update_my_account(uid, form_result)
357 h.flash(_('Your account was updated successfully'),
357 h.flash(_('Your account was updated successfully'),
358 category='success')
358 category='success')
359 Session.commit()
359 Session.commit()
360 except formencode.Invalid, errors:
360 except formencode.Invalid, errors:
361 c.user = User.get(self.rhodecode_user.user_id)
361 c.user = User.get(self.rhodecode_user.user_id)
362 all_repos = self.sa.query(Repository)\
362 all_repos = self.sa.query(Repository)\
363 .filter(Repository.user_id == c.user.user_id)\
363 .filter(Repository.user_id == c.user.user_id)\
364 .order_by(func.lower(Repository.repo_name))\
364 .order_by(func.lower(Repository.repo_name))\
365 .all()
365 .all()
366 c.user_repos = ScmModel().get_repos(all_repos)
366 c.user_repos = ScmModel().get_repos(all_repos)
367
367
368 return htmlfill.render(
368 return htmlfill.render(
369 render('admin/users/user_edit_my_account.html'),
369 render('admin/users/user_edit_my_account.html'),
370 defaults=errors.value,
370 defaults=errors.value,
371 errors=errors.error_dict or {},
371 errors=errors.error_dict or {},
372 prefix_error=False,
372 prefix_error=False,
373 encoding="UTF-8")
373 encoding="UTF-8")
374 except Exception:
374 except Exception:
375 log.error(traceback.format_exc())
375 log.error(traceback.format_exc())
376 h.flash(_('error occurred during update of user %s') \
376 h.flash(_('error occurred during update of user %s') \
377 % form_result.get('username'), category='error')
377 % form_result.get('username'), category='error')
378
378
379 return redirect(url('my_account'))
379 return redirect(url('my_account'))
380
380
381 @NotAnonymous()
381 @NotAnonymous()
382 @HasPermissionAnyDecorator('hg.admin', 'hg.create.repository')
382 @HasPermissionAnyDecorator('hg.admin', 'hg.create.repository')
383 def create_repository(self):
383 def create_repository(self):
384 """GET /_admin/create_repository: Form to create a new item"""
384 """GET /_admin/create_repository: Form to create a new item"""
385
385
386 c.repo_groups = RepoGroup.groups_choices()
386 c.repo_groups = RepoGroup.groups_choices()
387 c.repo_groups_choices = map(lambda k: unicode(k[0]), c.repo_groups)
387 c.repo_groups_choices = map(lambda k: unicode(k[0]), c.repo_groups)
388
388
389 new_repo = request.GET.get('repo', '')
389 new_repo = request.GET.get('repo', '')
390 c.new_repo = repo_name_slug(new_repo)
390 c.new_repo = repo_name_slug(new_repo)
391
391
392 return render('admin/repos/repo_add_create_repository.html')
392 return render('admin/repos/repo_add_create_repository.html')
393
393
394 def get_hg_ui_settings(self):
394 def get_hg_ui_settings(self):
395 ret = self.sa.query(RhodeCodeUi).all()
395 ret = self.sa.query(RhodeCodeUi).all()
396
396
397 if not ret:
397 if not ret:
398 raise Exception('Could not get application ui settings !')
398 raise Exception('Could not get application ui settings !')
399 settings = {}
399 settings = {}
400 for each in ret:
400 for each in ret:
401 k = each.ui_key
401 k = each.ui_key
402 v = each.ui_value
402 v = each.ui_value
403 if k == '/':
403 if k == '/':
404 k = 'root_path'
404 k = 'root_path'
405
405
406 if k.find('.') != -1:
406 if k.find('.') != -1:
407 k = k.replace('.', '_')
407 k = k.replace('.', '_')
408
408
409 if each.ui_section == 'hooks':
409 if each.ui_section == 'hooks':
410 v = each.ui_active
410 v = each.ui_active
411
411
412 settings[each.ui_section + '_' + k] = v
412 settings[each.ui_section + '_' + k] = v
413
413
414 return settings
414 return settings
General Comments 0
You need to be logged in to leave comments. Login now