Commit Graph
67 Commits
Author SHA1 Message Date
Lanre AdelowoandLunny Xiao de6539fc8c Add state param to milestone listing API (#7131)
* Support state params

* update tests

* fix tests

* add state=all support

* update tests

* update swagger

* update swagger
2019-06-06 08:37:45 +08:00
Lanre AdelowoandLauris BH 821184c203 Drop is_bare IDX only when it exists for MySQL and MariaDB (#6736)
* Drop is_bare IDX only when it exists

* show indexes only on mysql or mariadb
2019-04-24 20:43:38 +03:00
Lanre AdelowoandLunny Xiao 08d8ea9403 fix template error (#6737) 2019-04-24 21:14:36 +08:00
Lanre Adelowoandtechknowlogick 5c82ef098e make sure units of a team are returned (#6379) 2019-03-19 17:50:06 -04:00
Lanre Adelowoandtechknowlogick 141c58f5a6 add isAdmin to user model (#6231)
update vendor and add tests

fix swagger
2019-03-03 17:57:24 -05:00
Lanre Adelowoandtechknowlogick 094263db4d Show email if the authenticated user owns the profile page being requested for (#4981)
* Show email if the authenticated user owns the profile page being
requested for.

Also removed `setting.UI.ShowUserEmail` as it's documentation says it
only controls the email setting on the explore page

* fix current user check... This prevents a panic as a user must be signed in before ctx.User is called

* fix panic in tests

* try to fix tests

* Update year

* Test CI fail

* Revert change

* User 3 is not allowed to authorize

* Set user2 email to be private

* Change to user4 in explore page as user2 now has private email option set
2019-02-19 09:11:50 -05:00
Lanre AdelowoandLauris BH 44114b38e6 Implement "conversation lock" for issue comments (#5073) 2019-02-18 22:55:04 +02:00
Lanre Adelowoandtechknowlogick f2256d9881 make sure labels are actually returned (#6053) 2019-02-13 10:45:19 -05:00
Lanre AdelowoandLauris BH d0cb5aa9f9 fix #3200 (#6033) 2019-02-11 03:27:24 +02:00
Lanre Adelowoandtechknowlogick c71c28eab8 update docs (#6032) 2019-02-10 17:10:00 -05:00
Lanre AdelowoandLauris BH 9d8178b3ac Add option to close issues via commit on a non master branch (#5992)
* fixes #5957

* add tests to make sure config option is respected

* use already defined struct

* - use migration to make the flag repo wide not for the entire gitea instance
Also note that the config value can still be set so as to be able to control the value for new repositories that are to be created

- fix copy/paste error in copyright header year and rearrange import

- use repo config instead of server config value to determine if a commit should close an issue

- update testsuite

* use global config only when creating a new repository

* allow repo admin toggle feature via UI

* fix typo and improve testcase

* fix fixtures

* add DEFAULT prefix to config value

* fix test
2019-02-10 21:27:19 +02:00
Lanre Adelowoandzeripath 3a33742e38 disable git fsck for mirrored repos by default (#6018) 2019-02-09 14:34:50 +00:00
Lanre Adelowoandzeripath 2e85e70e38 Enhance closed PR and Issue status in the list (#6000)
* working version

* Update options/locale/locale_en-US.ini

Co-Authored-By: adelowo <adelowomailbox@gmail.com>

* update templates
2019-02-08 07:53:58 +00:00
Lanre Adelowoandtechknowlogick 9dfdf80af0 Expose issue stopwatch toggling via API (#5970) 2019-02-06 21:57:25 -05:00
Lanre Adelowoandzeripath c20034be31 Display the branch name in the commit view (#5950)
* add branch info

* Remove blank lines

* Remove blank lines

* update git dependency
2019-02-05 21:47:01 +00:00
Lanre AdelowoandLauris BH 5390791224 Automatically clear stopwatch on merging a PR (#4327)
* Don't display buttons if there are no notices

* clear stopwatch on merging a PR

* remove redundant gt check

* use ctx.Flash as per @bkcsoft comment

* stop timer on closing issues/PRs too

* updated translation as per review

* redirect to login page after successfully activating account

* remove unrelated changes

* stop timer for issues that are closed via commits too..Not just the 'close' UI button
2019-02-05 13:38:11 +02:00
Lanre Adelowoandtechknowlogick 024871ade6 Add label names as filter in issue search api (#5946) 2019-02-04 10:20:44 -05:00
Lanre AdelowoandLauris BH 634cbaad2b show user who created the repository instead of the organization in action feed (#5948) 2019-02-04 01:21:08 +02:00
Lanre Adelowoandtechknowlogick 746cf22d8a handle milestone events for issues and PR (#5947) 2019-02-03 13:31:58 -05:00
Lanre AdelowoandLunny Xiao f9d4bd53e6 support reviewing on a deleted file path (#5880) 2019-02-01 09:37:20 +08:00
Lanre Adelowoandtechknowlogick 57a69ef277 don't allow pull requests to be created on an archived repository (#5883)
* don't allow pull requests to be created on an archived repository
Also disable the "PR" button if the repo is archived

* Refuse creating an issue/PR via API calls too
2019-01-30 12:20:40 -05:00
Lanre Adelowoandtechknowlogick 6dc2f401c9 Don't discard the value of DISABLE_REGULAR_ORG_CREATION (#5886)
* Consider the configuration value of DISABLE_REGULAR_ORG_CREATION when
creating a user
2019-01-30 12:04:14 -05:00
Lanre Adelowoandtechknowlogick 7933a950d0 respect value of REQUIRE_SIGNIN_VIEW (#5901) 2019-01-30 11:45:48 -05:00
Lanre Adelowoandtechknowlogick 8b5f6ced22 if repo does not exist, show a 404 not a 500 (#5900) 2019-01-30 11:13:39 -05:00
Lanre Adelowoandtechknowlogick 16678f5255 fix compare button on upstream repo leading to 404 (#5877) 2019-01-29 18:49:07 -05:00
Lanre Adelowoandtechknowlogick 7461c5a75f Fix "pulls.blocked_by_approvals" text (#5879) 2019-01-28 10:05:20 -05:00
Lanre Adelowoandtechknowlogick b8a81cb1b8 Rename reject to 'request changes' (#5858)
* remame reject to 'request changes

* make usee of requested changes in issue's view content
2019-01-26 12:20:56 -05:00
Lanre AdelowoandLauris BH e1fcd6b742 Disallow empty titles (#5785)
* add util method and tests

* make sure the title of an issue cannot be empty

* wiki title cannot be empty

* pull request title cannot be empty

* update to make use of the new util methof
2019-01-21 13:45:32 +02:00
Lanre Adelowoandzeripath c212c98463 Fix wording when user is unassigned from an issue (#5769)
Previous Gitea would display that the user had unassigned themselves even if the actor
was not the user. Fixes #4418
2019-01-19 19:16:46 +00:00
Lanre Adelowoandtechknowlogick 9edc829c17 update docs to include THEMES config value (#5752)
* update docs to include THEMES

* Update app.ini.sample

* Update config-cheat-sheet.en-us.md
2019-01-17 14:48:01 -05:00
Lanre Adelowoandtechknowlogick 9e9d1b8f95 Fix migration for user defined themes (#5682) 2019-01-12 14:43:47 -05:00
Lanre Adelowoandtechknowlogick abb364f442 allow user fork repo even when as a guest.. This will prompt the user to login and if authentication was successful, the user will be redirected to fork the repo (#5690) 2019-01-10 23:25:14 -05:00
Lanre Adelowoandtechknowlogick 530c2b8ad8 document command line flags (#5675) 2019-01-09 12:52:10 -05:00
Lanre Adelowoandtechknowlogick 8d2c24f7f9 Allow for user specific themes (#5668)
* add migration and basic UI for changing a user's theme

* update user themem

* use right text on button

* load theme based on users' selection

* load theme based on users' selection in pwa too

* update sample config

* delete older theme loading

* implement AfterLoad to set users' theme properly

* set up default theme when creating a user. This uses the installation wide theme

* use flash messages for error

* set default theme when creating a user from the cli

* fix @lunny review
2019-01-09 12:22:57 -05:00
Lanre Adelowoandtechknowlogick 945804f800 Webhook for Pull Request approval/rejection (#5027) 2018-12-27 13:04:30 -05:00
Lanre AdelowoandJonas Franz 21357a4ae0 fix nil pointer when adding a due date (#5587)
* fix nil pointer

* remove nil check and just call loadRepo regardless
2018-12-27 16:02:43 +01:00
Lanre AdelowoandLauris BH a82ba73346 Make sure argsSet verifies string isn't empty too (#4980) 2018-12-27 14:38:38 +02:00
Lanre Adelowoandtechknowlogick 9441bfaccc admin should be able to delete repos even if he is not a member of the organization (#5443) 2018-12-02 11:08:33 -05:00
Lanre AdelowoandLauris BH 0787056e07 Allow to add organization members as collaborators on organization owned repositories (#4748)
repository... Fixes #4507
2018-11-30 10:49:55 +02:00
Lanre Adelowoandtechknowlogick 3a1ed82529 Explicitly decide whether to use TLS in mailer's configuration (#5024)
* explicitly decide on using TLS for mail connections

* explicitly decide on using TLS for mail connections

* keep compatibility
2018-11-26 14:21:41 -05:00
Lanre AdelowoandLauris BH ce9a5173fe fix password variable shadowing (#5405) 2018-11-26 17:00:38 +02:00
Lanre AdelowoandLunny Xiao 5e022a98e6 show only opened milestones on issues page milestone filter (#5051)
* show only opened milestones on issues page milestone filter

* update Godoc

* update Godoc everywhere

* update swagger

* use false instead of 0

* Add seccond ordering by ID for milestones where no deadline is set
2018-11-26 16:45:42 +08:00
Lanre AdelowoandLauris BH fd37fb01fd Don't force a password change for the admin user when creating an account via cli (#5391)
* don't force a password change for the admin user

* don't totally dicard -must-change-password flag if creating the first (admin) user via the cli. Use flag if present but make sure to default to not forcing a password update
2018-11-25 09:42:24 +02:00
Lanre Adelowoandtechknowlogick b97af15de6 Block registration based on email domain (#5157)
* implement email domain whitelist
2018-11-14 20:00:04 -05:00
Lanre Adelowoandtechknowlogick e5daa2698f Generate random password (#5023)
* add random-password flag

* run make fmt

* add length cli flag rather than use a default value
2018-10-30 17:34:25 -04:00
Lanre AdelowoandLauris BH c2748ea7fe Add must-change-password flag to cli for creating a user (#4955)
* add support for an admin to force a user to change his/her password from thee cli

* use BoolFlag instead

* default to true

* simplify by removing unnneccessary if/else
2018-10-21 01:05:01 +03:00
Lanre AdelowoandLauris BH e6d54d511d make sure milestone listing is consistent across board (#4987) 2018-09-28 06:59:46 +03:00
Lanre AdelowoandLauris BH acb6f8a518 make sure to catch the right error so it is displayed as an error on the ui not a 500 (#4945) 2018-09-16 18:27:43 +03:00
Lanre Adelowoandtechknowlogick 2a6d3ba058 Allow admin toggle forcing a password change for newly created users (#4563) 2018-09-13 12:34:36 -04:00
Lanre AdelowoandLauris BH 126ba796dc Force user to change password (#4489)
* redirect to login page after successfully activating account

* force users to change password if account was created by an admin

* force users to change password if account was created by an admin

* fixed build

* fixed build

* fix pending issues with translation and wrong routes

* make sure path check is safe

* remove unneccessary newline

* make sure users that don't have to view the form get redirected

* move route to use /settings prefix so as to make sure unauthenticated users can't view the page

* update as per @lafriks review

* add necessary comment

* remove unrelated changes

* support redirecting to location the user actually want to go to before being forced to change his/her password

* run make fmt

* added tests

* improve assertions

* add assertion

* fix copyright year

Signed-off-by: Lanre Adelowo <yo@lanre.wtf>
2018-09-13 15:04:25 +03:00
Lanre Adelowoandtechknowlogick 8ee9922fe6 Add file name and branch to page title (#4902) 2018-09-10 13:01:49 -04:00
Lanre Adelowoandtechknowlogick be48397945 Slack webhook channel name cannot be empty or just contain an hashtag (#4786) 2018-09-10 10:31:08 -04:00
Lanre Adelowoandtechknowlogick f766e9713b Add myself to maintainers (#4777) 2018-08-23 14:12:57 -04:00
Lanre AdelowoandLunny Xiao 33bc2ebdfa Make sure to reset commit count in the cache on mirror syncing (#4720)
* Make sure to reset commit count in the cache on mirror syncing

* reset count of commits in all branches
2018-08-23 14:15:07 +08:00
Lanre Adelowoandtechknowlogick 6ca8fbd2f9 Fixed bug where team with admin privelege type doesn't get any unit attached to the team (#4719) 2018-08-21 13:02:32 -04:00
Lanre AdelowoandJonas Franz 6c1a31ffaa User shouldn't be able to approve or reject his/her own PR (#4729)
* Make sure author cannot reject/approve their own PR

* Disable buttons in templates too

* Remove unneccessary if check since the switch below catches it

* Fix IsOwner check

* Update template and remove new template variable

* Add alert template and redirect to diff page on review failure

* Redirect to files diff as a little update to #4632
2018-08-20 07:04:01 +02:00
Lanre AdelowoandLauris BH a6cdda115d Display error when adding a user to a team twice (#4746) 2018-08-19 21:49:19 +03:00
Lanre Adelowoandtechknowlogick 3422077a89 make sure to set pr split view (#4617)
Signed-off-by: Lanre Adelowo <yo@lanre.wtf>
2018-08-11 20:20:33 -04:00
Lanre Adelowoandtechknowlogick 69a855f3d4 log user in after a successful sign up (#4615) 2018-08-11 15:33:19 -04:00
Lanre AdelowoandLauris BH 3b51c4f3fb Show review comment box only on a pull request page (#4636)
* Show review comment box only on a pull request page

* Fixed template check
2018-08-08 08:20:04 +03:00
Lanre AdelowoandLauris BH 0df7cab4fb prevent empty review comment (#4632)
* prevent empty review comment

This would only require a comment for rejection and comment

* add tests

* add comment
2018-08-07 20:15:41 +03:00
Lanre AdelowoandLauris BH 59b10e66f7 An inactive user shouldn't be able to be added as a collaborator (#4535)
* an inactive user shouldn't be able to be a collaborator

* use translated error message

* add active user check when adding a new collaborator via the api

* fix translation text

* added collaborator test

* improvee testcases
2018-08-07 13:01:06 +03:00
Lanre AdelowoandLunny Xiao c7a6ee5c0b Don't fail silently if trying to add a collaborator twice (#4533)
* don't fail silently if trying to add a collaborator twice

* fix translation text

* added collaborator test

* improvee testcases

* Added tests to make sure a collaborator cannot be added twice
2018-08-07 09:59:42 +08:00
Lanre AdelowoandLauris BH b11ddd8d4c fix status code label for a successful webhook (#4540) 2018-07-30 10:27:31 +03:00
Lanre AdelowoandLauris BH 630f234223 Add flash message after an account has been successfully activated (#4510)
* added new locale text
2018-07-25 20:54:56 +03:00
Lanre AdelowoandLauris BH 4bf0cae1f5 Respect email privacy option in user search via API (#4512)
* respect user's email privacy option

* make email visible to admin irrespective of privacy option
2018-07-25 15:11:22 +03:00
Lanre AdelowoandJonas Franz 5bc8782d33 Don't display buttons if there are no system notifications (#4280)
* Don't display buttons if there are no notices

* remove redundant gt check
2018-07-05 17:35:42 +02:00