Unknwon
69c1cd3f38
routes/api: change status handle to new style
...
Also fixed one bug that did not catch team not found error.
2018-12-01 21:41:30 -05:00
Unknwon
77275a9b31
models: rename Id to ID
2018-08-16 20:26:09 +08:00
Unknwon
53c8e4263b
models: skip JSON for fields skipped by XORM
...
Reduce output JSON size by backup command
2018-06-09 16:06:47 +08:00
Unknwon
aff4208244
*: rename "gogits" to "gogs"
2018-05-27 08:53:48 +08:00
Unknwon
0e6a6bf880
Refactoring: remove sessionRelease()
...
XORM supports automatic roll back in session Close() already.
2017-06-11 03:06:36 -04:00
Pablo Saavedra
5906268917
models/org_team: getUserTeams uses includes always -1 in the IN statement ( #4412 )
...
Ensure that the IN clause contains one value at least. The idea is avoid a
syntax error in the SQL sentence and rollbacks in the transactions.
For example:
ERROR: syntax error at or near ")"
LINE 1: ...RE ... and team.id IN ();
We will always add the -1 value in the IN list.
2017-05-29 23:24:37 -04:00
Unknwon
ce6e8ed8fe
models: remove redundant tags for primary keys
2017-05-21 04:36:41 -04:00
Unknwon
1038916460
models/protect_branch: fix whitelist with invalid 'protect_branch_id' ( #4333 )
...
If user creates a protect branch for the first time (which has ID=0),
it generates invalid whitelist records with 'protect_branch_id=0'.
This prevents future updates of protect branch whitelist.
Migration: remove existing invalid protect branch whitelist records.
2017-03-27 13:13:04 -04:00
Unknwon
c238647020
cmd/web: remove dependency version checker
2017-03-25 04:17:55 -04:00
Unknwon
10b93efc4a
repo: able to add organization member as repository collaborator
2017-02-24 13:56:02 -05:00
Unknwon
0696d430c9
protect_branch: only list teams have write access
...
List teams without write access to the repository cause confusion
to make users think members of team could push to the branch.
2017-02-24 13:19:42 -05:00
Unknwon
6072e9a52c
repo: add protect branch whitelist ( #4177 )
...
Add options to add users and teams to whitelist of a protected
branch. This is only available for organizational repositories.
2017-02-23 18:25:12 -05:00
Unknwon
b78e03934d
models/access: hasAccess only need userID not user object
2017-02-23 16:15:25 -05:00
Unknwon
f4aedda13a
org/team: make 'new' as reserved for team name ( #3789 )
2017-02-14 03:16:02 -05:00
Unknwon
ede58ade4c
models/org_team: fix compile error
2017-02-08 18:18:55 -05:00
Unknwon
a2dd9ec2e1
models/org_team: panic when team num_repos is negative ( #3671 )
2017-02-08 18:13:46 -05:00
Unknwon
8f442dde03
Dirty hack for #3905
...
I beileve this is a bug in XORM which wrongly identifies a struct
to inappropriate table name. Also seems to be random.
2016-12-21 05:11:52 -05:00
Unknwon
34b92cdb44
Fix #3905
2016-12-20 23:23:57 -05:00
Unknwon
1f2e173a74
Refactor User.Id to User.ID
2016-07-24 01:08:22 +08:00
Unknwon
b1d41cfa60
#1692 add admin APIs to add/remove a user from teams
2016-03-25 18:04:02 -04:00