fix(hub): Prevent registered actions
This commit is contained in:
parent
0d08da50c6
commit
d6b664f7ee
@ -10,7 +10,6 @@ import requests
|
|||||||
from frappe import _
|
from frappe import _
|
||||||
from frappe.frappeclient import FrappeClient
|
from frappe.frappeclient import FrappeClient
|
||||||
from frappe.desk.form.load import get_attachments
|
from frappe.desk.form.load import get_attachments
|
||||||
from frappe.utils.file_manager import get_file_path
|
|
||||||
from six import string_types
|
from six import string_types
|
||||||
|
|
||||||
current_user = frappe.session.user
|
current_user = frappe.session.user
|
||||||
|
@ -113,6 +113,10 @@ export default {
|
|||||||
content: this.review_content.get_value()
|
content: this.review_content.get_value()
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (!hub.is_seller_registered()) {
|
||||||
|
frappe.throw(__('You need to login as a Marketplace User before you can add any reviews.'));
|
||||||
|
}
|
||||||
|
|
||||||
hub.call('add_item_review', {
|
hub.call('add_item_review', {
|
||||||
hub_item_name: this.hub_item_name,
|
hub_item_name: this.hub_item_name,
|
||||||
review: JSON.stringify(review)
|
review: JSON.stringify(review)
|
||||||
|
@ -265,6 +265,9 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
report_item() {
|
report_item() {
|
||||||
|
if (!hub.is_seller_registered()) {
|
||||||
|
frappe.throw(__('Please login as a Marketplace User to report this item.'));
|
||||||
|
}
|
||||||
this.report_item_dialog.show();
|
this.report_item_dialog.show();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user