aboutsummaryrefslogtreecommitdiffstats
path: root/routers/org
Commit message (Collapse)AuthorAgeFilesLines
* site admin could view org's members (#9346)Lunny Xiao2019-12-142-1/+134
|
* Only show part of members on orgnization dashboard and add paging for ↵Lunny Xiao2019-12-061-5/+35
| | | | | | | | | | orgnization members page (#9092) * Only show part of members on orgnization dashboard and add paging for orgnization members page * fix test * fix typo
* Team permission to create repository in organization (#8312)David Svantesson2019-11-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add team permission setting to allow creating repo in organization. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add test case for creating repo when have team creation access. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * build error: should omit comparison to bool constant Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add comment on exported functions * Fix fixture consistency, fix existing unit tests * Fix boolean comparison in xorm query. * addCollaborator and changeCollaborationAccessMode separate steps More clear to use different if-cases. * Create and commit xorm session * fix * Add information of create repo permission in team sidebar * Add migration step * Clarify that repository creator will be administrator. * Fix some things after merge * Fix language text that use html * migrations file * Create repository permission -> Create repositories * fix merge * fix review comments
* Only return JSON for add/remove all (#9028)John Olheiser2019-11-161-4/+8
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Allow to add and remove all repositories to/from team. (#8867)David Svantesson2019-11-091-0/+8
| | | | | | | | | | | | | | | | * Allow to add and remove all repositories to team. * Change style, buttons on same row. * Apply suggestions from code review Grammar Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Move set num repos to lower function. * Make general language sentences
* Add team option to grant rights for all organization repositories (#8688)David Svantesson2019-11-061-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add field IsAllRepositories to team * Add AllRepositories to team UI * Manage team with access to all repositories * Add field IsAllRepositories to team API * put backticks around table/column names * rename IsAllRepositories to IncludesAllRepositories * do not reload slice if already loaded * add repo to teams with access to all repositories when changing repo owner * improve tests for teams with access to all repositories * Merge branch 'master' * Change code for adding all repositories Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * fmt after merge * Change code in API EditTeam similar to EditTeamPost web interface Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Clarify that all repositories will be added Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * All repositories option under Permissions headline * New setting group 'Repository access' * Move check IncludeAllRepositories to removeRepository. * Revert "Move check IncludeAllRepositories to removeRepository." and add comment instead. This reverts commit 753b7d205be260b8be465b5291a02975a81f3093. * Clarify help text what options do.
* Fix errors in create org UI regarding team access permission. (#8506)David Svantesson2019-10-141-4/+5
|
* Fix repo_admin_change_team_access always checked in org settings (#8319)David Svantesson2019-09-301-0/+1
| | | Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
* Add teams to repo on collaboration page. (#8045)David Svantesson2019-09-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add teams to repo on collaboration page. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add option for repository admins to change teams access to repo. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add comment for functions Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make RepoAdminChangeTeamAccess default false in xorm and make it default checked in template instead. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make proper language strings and fix error redirection. * Add unit tests for adding and deleting team from repository. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add database migration Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix redirect Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix locale string mismatch. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Move team access mode text logic to template. * Move collaborator access mode text logic to template.
* Use gitea forked macaron (#7933)Tamal Saha2019-08-232-4/+4
| | | Signed-off-by: Tamal Saha <tamal@appscode.com>
* org/members: display 2FA members states + optimize sql requests (#7621)Antoine GIRARD2019-08-021-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * org/members: display 2FA state * fix comment typo * lay down UserList bases * add basic test for previous methods * add comment for UserList type * add valid two-fa account * test new UserList methods * optimize MembersIsPublic by side loading info on GetMembers + fix integrations tests * respect fmt rules * use map for data * Optimize GetTwoFaStatus * rewrite by using existing sub func * Optimize IsUserOrgOwner * remove un-used code * tests: cover empty org + fix import order * tests: add ErrTeamNotExist path * tests: fix wrong expected result
* Removed unnecessary conversions (#7557)Christian Muehlhaeuser2019-07-231-3/+2
| | | No need to convert to the same type.
* add missing template variable on organisation settings (#7385)Cherrg2019-07-091-0/+1
| | | | | fix #6755 Signed-off-by: Michael Gnehr <michael@gnehr.de>
* Add golangci (#6418)kolaente2019-06-121-1/+6
|
* Better logging (#6038) (#6095)zeripath2019-04-022-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Panic don't fatal on create new logger Fixes #5854 Signed-off-by: Andrew Thornton <art27@cantab.net> * partial broken * Update the logging infrastrcture Signed-off-by: Andrew Thornton <art27@cantab.net> * Reset the skip levels for Fatal and Error Signed-off-by: Andrew Thornton <art27@cantab.net> * broken ncsa * More log.Error fixes Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove nal * set log-levels to lowercase * Make console_test test all levels * switch to lowercased levels * OK now working * Fix vetting issues * Fix lint * Fix tests * change default logging to match current gitea * Improve log testing Signed-off-by: Andrew Thornton <art27@cantab.net> * reset error skip levels to 0 * Update documentation and access logger configuration * Redirect the router log back to gitea if redirect macaron log but also allow setting the log level - i.e. TRACE * Fix broken level caching * Refactor the router log * Add Router logger * Add colorizing options * Adjust router colors * Only create logger if they will be used * update app.ini.sample * rename Attribute ColorAttribute * Change from white to green for function * Set fatal/error levels * Restore initial trace logger * Fix Trace arguments in modules/auth/auth.go * Properly handle XORMLogger * Improve admin/config page * fix fmt * Add auto-compression of old logs * Update error log levels * Remove the unnecessary skip argument from Error, Fatal and Critical * Add stacktrace support * Fix tests * Remove x/sync from vendors? * Add stderr option to console logger * Use filepath.ToSlash to protect against Windows in tests * Remove prefixed underscores from names in colors.go * Remove not implemented database logger This was removed from Gogs on 4 Mar 2016 but left in the configuration since then. * Ensure that log paths are relative to ROOT_PATH * use path.Join * rename jsonConfig to logConfig * Rename "config" to "jsonConfig" to make it clearer * Requested changes * Requested changes: XormLogger * Try to color the windows terminal If successful default to colorizing the console logs * fixup * Colorize initially too * update vendor * Colorize logs on default and remove if this is not a colorizing logger * Fix documentation * fix test * Use go-isatty to detect if on windows we are on msys or cygwin * Fix spelling mistake * Add missing vendors * More changes * Rationalise the ANSI writer protection * Adjust colors on advice from @0x5c * Make Flags a comma separated list * Move to use the windows constant for ENABLE_VIRTUAL_TERMINAL_PROCESSING * Ensure matching is done on the non-colored message - to simpify EXPRESSION
* Implement Default Webhooks (#4299)Russell Aunger2019-03-181-1/+1
| | | | | | | | Partially implement #770. Add "Default Webhooks" page in site admin UI. Persist to the existing webhooks table, but store with RepoID=0 and OrgID=0. Upon repo creation, copy the set of default webhooks into the new repo.
* fix bug when update owner team then visit team's repo return 404 (#6119)Lunny Xiao2019-02-221-2/+0
|
* Allow to set organization visibility (public, internal, private) (#1763)Rémy Boulanouar2019-02-182-3/+10
|
* Improve team members and repositories settings UI (#5457)Lunny Xiao2018-12-091-0/+2
| | | | | | | | | | | | * improve team members and repositories settings UI * use tab on team pages * add default description on team members and repos * add blank on numbers and texts * improve translation
* Fixed bug where team with admin privelege type doesn't get any unit attached ↵Lanre Adelowo2018-08-211-2/+3
| | | | to the team (#4719)
* Display error when adding a user to a team twice (#4746)Lanre Adelowo2018-08-191-1/+6
|
* hide issues from org private repos w/o team assignment (#4034)David Schneiderbauer2018-06-211-3/+18
|
* Splitted the user settings code into several files to be more maintainable ↵David Schneiderbauer2018-05-171-2/+2
| | | | | | | | | | | | | | | | | (#3968) * refactor setting router code splitted up one huge router settings file into the smaller files representing the actual page structure * move code to subfolder * rename functions * renamed files * add copyright information
* Address issues pointed out by @lunny in #3339 (#3352)Morgan Bazalgette2018-01-121-7/+4
|
* Handle refactor (#3339)Morgan Bazalgette2018-01-104-17/+25
| | | | | | * Replace all ctx.Handle with ctx.ServerError or ctx.NotFound * Change Handle(403) to NotFound, avoid using macaron's NotFound
* Allow adding collaborators with (fullname) (#3103)Sasha Varlamov2017-12-071-5/+2
| | | | | | | | | | * Allow adding collaborators with (fullname) Signed-off-by: Sasha Varlamov <sasha@sashavarlamov.com> * Refactor username suffix to utils pkg Signed-off-by: Sasha Varlamov <sasha@sashavarlamov.com>
* Fix error when add user has full name to team (#2973)Lunny Xiao2017-11-261-0/+5
| | | | | | * fix error when add user has full name to team * add comment for extra uname check
* Remove direct user adding to organization members (#2641)Lauris BH2017-10-151-40/+0
|
* Remove unit types commits and settings (#2161)Lauris BH2017-07-171-19/+28
| | | | | | | | | | * Remove unit types commits and settings * Can not limit units in administrator teams * Limit changing units only to teams with read and write access mode * Small code optimization
* fix bug to deny to add orgnization as a member of an orgnization or team (#1815)Lunny Xiao2017-05-262-0/+12
|
* Add units to team (#947)Lunny Xiao2017-05-181-0/+4
| | | | | | | | | | | | | | | | | | * add units to team * fix lint * finish team setting backend * finished permission controll on routes * fix import blank line * add unit check on ssh/http pull and push and fix test failed * fix fixtures data * remove unused code
* fix leave team 404 (#1154)Lunny Xiao2017-03-091-0/+2
|
* Restrict creating organisations by user (#193)Schwobaland2016-12-311-0/+8
| | | | | | | | | | | | | | | | | | | | | | * restrict creating organizations based on right on user * revert bindata.go * reverse vendor lib * revert goimports change * set AllowCreateOrganization default value to true * revert locale * added default value for AllowCreateOrganization * fix typo in migration-comment * fix comment * add coments in migration
* Golint fixed for modules/setting (#262)Lunny Xiao2016-11-273-4/+4
| | | | | | * golint fixed for modules/setting * typo fixed and renamed UNIXSOCKET to UnixSocket
* golint fixed for parts of routers root, dev, user and org dirs (#167)Lunny Xiao2016-11-184-33/+65
| | | | | | | | * golint fixed for parts of routers root, dev and org dirs * add user/auth.go golint fixed * rename unnecessary exported to unexported and user dir golint fixed
* Update import paths from github.com/go-gitea to code.gitea.io (#135)Sandro Santilli2016-11-104-23/+23
| | | | | | | - Update import paths from github.com/go-gitea to code.gitea.io - Fix import path for travis See https://docs.travis-ci.com/user/languages/go#Go-Import-Path
* moreSandro Santilli2016-11-071-1/+1
|
* And othersSandro Santilli2016-11-071-1/+1
|
* ACCESS_MODE_* -> AccessMode*Sandro Santilli2016-11-071-3/+3
|
* Change import reference to match gitea instead of gogs (#37)Rémy Boulanouar2016-11-034-23/+23
|
* Add support for federated avatars (#3320)Sandro Santilli2016-08-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add support for federated avatars Fixes #3105 Removes avatar fetching duplication code Adds an "Enable Federated Avatar" checkbox in user settings (defaults to unchecked) Moves avatar settings all in the same form, making local and remote avatars mutually exclusive Renames UploadAvatarForm to AvatarForm as it's not anymore only for uploading * Run gofmt on all modified files * Move Avatar form in its own page * Add go-libravatar dependency to vendor/ dir Hopefully helps with accepting the contribution. See also #3214 * Revert "Add go-libravatar dependency to vendor/ dir" This reverts commit a8cb93ae640bbb90f7d25012fc257bda9fae9b82. * Make federated avatar setting a global configuration Removes the per-user setting * Move avatar handling back to base tool, disable federated avatar in offline mode * Format, handle error * Properly set fallback host * Use unsupported github.com mirror for importing go-libravatar * Remove comment showing life exists outside of github.com ... pity, but contribution would not be accepted otherwise * Use Combo for Get and Post methods over /avatar * FEDERATED_AVATAR -> ENABLE_FEDERATED_AVATAR * Fix persistance of federated avatar lookup checkbox at install time * Federated Avatars -> Enable Federated Avatars * Use len(string) == 0 instead of string == "" * Move import line where it belong See https://github.com/Unknwon/go-code-convention/blob/master/en-US/import_packages.md Pity the import url is still the unofficial one, but oh well... * Save a line (and waste much more expensive time) * Remove redundant parens * Remove an empty line * Remove empty lines * Reorder lines to make diff smaller * Remove another newline Unknwon review got me start a fight against newlines * Move DISABLE_GRAVATAR and ENABLE_FEDERATED_AVATAR after OFFLINE_MODE On re-reading the diff I figured what Unknwon meant here: https://github.com/gogits/gogs/pull/3320/files#r73741106 * Remove newlines that weren't there before my intervention
* Refactor User.Id to User.IDUnknwon2016-07-243-14/+14
|
* models/webhook: restrict deletion to be explicitly with repo and org IDUnknwon2016-07-171-16/+2
|
* #3274 fix can't get webhook detail of organizationUnknwon2016-07-161-1/+1
|
* #1692 api: admin list and create team under organizationUnknwon2016-03-211-15/+1
|
* #13 finish user and repository searchUnknwon2016-03-111-1/+1
| | | | Both are possible on explore and admin panel
* Rename module: middleware -> contextUnknwon2016-03-114-26/+26
|
* Added: Ability to delete org avatar.Tamás Molnár2016-03-061-0/+8
|
* Remove unnecessary commentsFlorian Kaiser2016-01-311-1/+0
|
* Only show teams the user has access toFlorian Kaiser2016-01-311-4/+1
|