Merge branch 'hub-redesign' of https://github.com/frappe/erpnext into hub-redesign
This commit is contained in:
commit
a4c24bda65
@ -1,7 +1,9 @@
|
||||
from __future__ import unicode_literals
|
||||
import frappe, json
|
||||
import io, base64, os, requests
|
||||
from frappe.frappeclient import FrappeClient
|
||||
from frappe.desk.form.load import get_attachments
|
||||
from frappe.utils.file_manager import get_file_path
|
||||
from six import string_types
|
||||
|
||||
@frappe.whitelist()
|
||||
@ -119,9 +121,6 @@ def item_sync_postprocess():
|
||||
|
||||
|
||||
def load_base64_image_from_items(items):
|
||||
import io, base64, urllib, os, requests, tempfile
|
||||
from frappe.utils.file_manager import get_file_path
|
||||
|
||||
for item in items:
|
||||
file_path = item['image']
|
||||
file_name = os.path.basename(file_path)
|
||||
|
@ -23,10 +23,12 @@ class HubSettings(Document):
|
||||
def register(self):
|
||||
""" Create a User on hub.erpnext.org and return username/password """
|
||||
|
||||
if frappe.session.user == 'Administrator':
|
||||
frappe.throw(_('Please login as another user to register on Marketplace'))
|
||||
|
||||
if 'System Manager' not in frappe.get_roles():
|
||||
frappe.throw(_('Only users with System Manager role can register on Marketplace'), frappe.PermissionError)
|
||||
|
||||
# TODO: site_name for cloud sites
|
||||
self.site_name = frappe.utils.get_url()
|
||||
|
||||
data = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user