2014-10-07 09:05:24 -04:00
|
|
|
module Gitlab
|
|
|
|
class GitAccessWiki < GitAccess
|
2015-03-24 09:10:55 -04:00
|
|
|
def change_access_check(change)
|
2015-06-26 09:55:56 -04:00
|
|
|
if user.can?(:create_wiki, project)
|
2014-11-14 11:23:55 -05:00
|
|
|
build_status_object(true)
|
|
|
|
else
|
2015-05-10 17:07:35 -04:00
|
|
|
build_status_object(false, "You are not allowed to write to this project's wiki.")
|
2014-11-14 11:23:55 -05:00
|
|
|
end
|
2014-10-07 09:05:24 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|