Remove unused code

This commit is contained in:
Joseph Schorr 2018-03-09 16:46:29 -05:00
parent 96fafcdffb
commit f1da3c452f
3 changed files with 0 additions and 40 deletions

View file

@ -268,17 +268,6 @@ class OCIAppModel(AppRegistryDataInterface):
channel = oci_model.channel.create_or_update_channel(repo, channel_name, release)
return ChannelView(current=channel.linked_tag.name, name=channel.name)
def get_user(self, username, password):
err_msg = None
if parse_robot_username(username) is not None:
try:
user = data.model.user.verify_robot(username, password)
except data.model.InvalidRobotException as exc:
return (None, exc.message)
else:
user, err_msg = authentication.verify_and_link_user(username, password)
return (user, err_msg)
def get_blob_locations(self, digest):
return oci_model.blob.get_blob_locations(digest)

View file

@ -160,22 +160,6 @@ class DockerRegistryV1DataInterface(object):
"""
pass
@abstractmethod
def load_token(self, token):
"""
Loads the data associated with the given (deprecated) access token, and, if
found returns True.
"""
pass
@abstractmethod
def verify_robot(self, username, token):
"""
Returns True if the given robot username and token match an existing robot
account.
"""
pass
@abstractmethod
def change_user_password(self, user, new_password):
"""

View file

@ -137,19 +137,6 @@ class PreOCIModel(DockerRegistryV1DataInterface):
def delete_tag(self, namespace_name, repo_name, tag_name):
model.tag.delete_tag(namespace_name, repo_name, tag_name)
def load_token(self, token):
try:
model.token.load_token_data(token)
return True
except model.InvalidTokenException:
return False
def verify_robot(self, username, token):
try:
return bool(model.user.verify_robot(username, token))
except model.InvalidRobotException:
return False
def change_user_password(self, user, new_password):
model.user.change_password(user, new_password)