Only allow primary domain for RS
Replace user addresses with usernames in the respective URLs
This commit is contained in:
@@ -10,7 +10,7 @@ RSpec.describe 'remoteStorage OAuth Dialog', type: :feature do
|
||||
|
||||
context "with normal permissions" do
|
||||
before do
|
||||
visit new_rs_oauth_path(useraddress: user.address,
|
||||
visit new_rs_oauth_path(username: user.cn,
|
||||
redirect_uri: "http://example.com",
|
||||
client_id: "http://example.com",
|
||||
scope: "documents,[photos], contacts:r")
|
||||
@@ -36,7 +36,7 @@ RSpec.describe 'remoteStorage OAuth Dialog', type: :feature do
|
||||
context "root access" do
|
||||
context "full" do
|
||||
before do
|
||||
visit new_rs_oauth_path(useraddress: user.address,
|
||||
visit new_rs_oauth_path(username: user.cn,
|
||||
redirect_uri: "http://example.com",
|
||||
client_id: "http://example.com",
|
||||
scope: ":rw")
|
||||
@@ -60,7 +60,7 @@ RSpec.describe 'remoteStorage OAuth Dialog', type: :feature do
|
||||
end
|
||||
|
||||
it "prefills the username field in the signin form" do
|
||||
visit new_rs_oauth_path(useraddress: user.address,
|
||||
visit new_rs_oauth_path(username: user.cn,
|
||||
redirect_uri: "http://example.com",
|
||||
client_id: "http://example.com",
|
||||
scope: "documents,[photos], contacts:r")
|
||||
@@ -69,7 +69,7 @@ RSpec.describe 'remoteStorage OAuth Dialog', type: :feature do
|
||||
end
|
||||
|
||||
it "redirects to the OAuth dialog after sign-in" do
|
||||
auth_url = new_rs_oauth_url(useraddress: user.address,
|
||||
auth_url = new_rs_oauth_url(username: user.cn,
|
||||
redirect_uri: "http://example.com",
|
||||
client_id: "http://example.com",
|
||||
scope: "documents,[photos], contacts:r")
|
||||
|
||||
Reference in New Issue
Block a user