-
Notifications
You must be signed in to change notification settings - Fork 436
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[webui] Drop editing LDAP user accounts
- Loading branch information
Showing
8 changed files
with
182 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
require 'rails_helper' | ||
# WARNING: If you change tests make sure you uncomment this line | ||
# and start a test backend. Some of the actions | ||
# require real backend answers for projects/packages. | ||
# CONFIG['global_write_through'] = true | ||
|
||
RSpec.describe PersonController, vcr: false do | ||
describe 'POST #post_userinfo' do | ||
let(:user) { create(:confirmed_user) } | ||
|
||
context 'when in LDAP mode' do | ||
before do | ||
login user | ||
stub_const('CONFIG', CONFIG.merge({ 'ldap_mode' => :on })) | ||
post :post_userinfo, params: { login: user.login, cmd: 'change_password', format: :xml } | ||
end | ||
|
||
it 'user is not allowed to change their password' do | ||
expect(response.header['X-Opensuse-Errorcode']).to eq('change_password_no_permission') | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters