SVNSERVE access control, authz file - svnserve

I have followed a tutorial and it works without the authz file, but when I add the file in in svnserve.conf
my root folder: /home/repos/
project 1 svnserve.conf:
anon-access = none
auth-access = write
password-db = /home/reops/passwd-users
authz-db = /home/repos/authz
if authz-db is commented out then it works but doesnt if its uncommented.
authz file:
[/project1]
nick = rw
harry = r
* =
when I checkout I get access denied for nick and harry even though its the right password for each user and they have access in authz file.
the error I get is authorization denied. Any ideas?

Found the answer:
the authz file was not formatted properly, it should have been:
[/]
[project2:/]
nick = rw
harry = r
* =

Related

P4Python Adding new file - [Error]: Null directory (//) not allowed in //workspaceXXXX//xxxx.txt

I am trying to add new to perforce. I getting error as below
[Error]: "Null directory (//) not allowed in '//workspaceXXXX//xxxx.txt'."
What i am doing:
1) I create a workspace
self.p4.client = "workspaceXXXX"
client = self.p4.fetch_client("workspaceXXXX")
client._root = "../temp/"workspaceXXXX""
depotPath = "//TEAM/PATH_1/PATH_2/2018-Aug-06/..."
wsPath = "//workspaceXXXX/..."
client._view = [depotPath+" "+wsPath]
"""Create a workspace"""
self.p4.save_client(client)
2) Place the new in the workspace
3) Add file
self.p4.run("add", "//TEAM/PATH_1/PATH_2/2018-Aug-06/xxxx.txt")
While adding file i encounter the above error. What am i doing wrong here.

Liquidsoap Icecast request.dynamic error

I would like to create dynamic playlist with liquidesoap and icecast. I've just copied the tutorial from the liquidsoap website but unfortunately it does not work.
This is my code:
def get_next() =
result = list.hd(get_process_lines("/var/www/radiod/yii program-generator/next-track 1"))
# Create and return a request using this result
request.create(result)
end
# Create the source
s = request.dynamic(id="s", get_next)
# Output
source = output.icecast(%mp3, host="localhost", port=8000, mount="opera.mp3", password="asd123", s)
I get this error message when I run the check command:
Invalid value at line 9, char 20-37: That source is fallible.
So, the problem will be around this line:
s = request.dynamic(id="s", get_next)
Can you help me what could be the failure?
Thanking you in advance!
http://savonet.sourceforge.net/doc-svn/quick_start.html covers "That source is fallible." in detail. Might want to go through the whole page.

how to attach a pdf in google app engine python send_mail function?

I cannot find any example on how to attach files(pdf) that are within my root folder of the site in python (google app engine) send_mail function.
url_test = "https://mywebsite.com/pdf/test.pdf"
test_file = urlfetch.fetch(url_test)
if test_file.status_code == 200:
test_document = test_file.content
mail.send_mail(sender=EMAIL_SENDER,
to=['test#test.com'],
subject=subject,
body=theBody,
attachments=[("testing",test_document)])
Decided to try it with EmailMessage:
message = mail.EmailMessage( sender=EMAIL_SENDER,
subject=subject,body=theBody,to=['myemail#gmail.com'],attachments=
[(attachname, blob.archivoBlob)])
message.send()
The above blob attachment is successfully sending however attaching a file with relative path always says "invalid attachment"
new_file = open(os.path.dirname(__file__) +
'/../pages/pdf/test.PDF').read()
message = mail.EmailMessage( sender=EMAIL_SENDER,
subject=subject,body=theBody,to=['myemail#gmail.com'],attachments=
[('testing',new_file )])
message.send()
In debugging I have also tried to see if the file is being read by doing this:
logging.info(new_file)
It seems to be reading the file as it outputs some unicode characters
Please help why am I not able to attach a PDF while I can attach a blob
When calling the attachments, the File type has to be indicated on the file title, for example attachments= [('testing.pdf',new_file )]). View this link

Display a docx file on the screen

I created a ms-word document using MailMerge in django. It´s worked ok.
Right now, i´d like to show this file on screen. I write the code bellow, but it didn´t work.
views.py
with open(file_path) as doc:
response = HttpResponse(doc.read(), content_type='application/ms-word')
response = HttpResponse(template_output)
response['Content-Disposition'] = 'attachment;filename=var_nomdocumento_output'
error:
[Errno 13] Permission denied: 'C:\\GROWTHTECH\\Projetos\\blockchain\\media_root/procuracao'
You forgot to provide the binary open mode. It can be r open for reading (default) w open for writing, truncating the file first, b for binary mode.
so In our case: It will be rb
file_path = 'path/path/file.docx'
with open(file_path,'rb') as doc:
response = HttpResponse(doc.read(), content_type='application/ms-word')
# response = HttpResponse(template_output)
response['Content-Disposition'] = 'attachment;filename=name.docx'
return response
No browsers currently render Word Documents as far as I know. So your file will be automatically downloaded whatever the parameter is: 'attachment;filename="file_name"' or 'inline;filename="file_name"'

unable to run openstack tempest testcases in group

i have created one sampletest.txt file in tempest folder and written tempest test case location in that file.
now i want to run that file using testr or nosetest so that all the test case present in that file get executed..
example
contents in sampletest.txt file
tempest.api.identity.admin.test_users:UsersTestJSON.test_create_user_with_enabled
tempest.api.identity.admin.test_roles:RolesTestJSON.test_role_create_delete
tempest.api.identity.admin.test_roles:RolesTestJSON.test_get_role_by_id
tempest.api.identity.admin.test_roles:RolesTestJSON.test_remove_user_role
now i want to execute this sampletest.txt file so that all the testcase get executed...
if i am executing this file nosetests -vx sampletest.txt , i am getting error
Try to use tilt and cat the file Eg:
nosetest -vx `cat sampletest.txt`
Please make sure to configure your etc/tempest.conf are as below,
[identity]
uri=http://127.0.0.1:5000/v2.0/
uri_v3 = http://127.0.0.1:5000/v3/
auth_version=v2
admin_domain_name = Default
admin_tenant_name = admin
admin_password = {your_openstack_admin_login_password}
admin_username = admin
tenant_name = {non-admin-tenant-eg-demo}
username = {non-admin-user-eg-demo}
password = {non-admin-user-password}
[dashboard]
login_url=http://127.0.0.1/auth/login/
uri_v3 = http://127.0.0.1:5000/v3/
If still you are getting any errors please post your error logs.
You can also refer my post :http://naggappan.wordpress.com/2014/10/15/configure-and-execute-tempest-in-openstack-environment/